Movatterモバイル変換


[0]ホーム

URL:


bigqueryreservation

package
v0.257.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:15Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package bigqueryreservation provides access to the BigQuery Reservation API.

For product documentation, see:https://cloud.google.com/bigquery/

Creating a client

Usage example:

import "google.golang.org/api/bigqueryreservation/v1alpha2"...ctx := context.Background()bigqueryreservationService, err := bigqueryreservation.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:

bigqueryreservationService, err := bigqueryreservation.NewService(ctx, option.WithScopes(bigqueryreservation.CloudPlatformScope))

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

bigqueryreservationService, err := bigqueryreservation.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)bigqueryreservationService, err := bigqueryreservation.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seehttps://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (// View and manage your data in Google BigQueryBigqueryScope = "https://www.googleapis.com/auth/bigquery"// View and manage your data across Google Cloud Platform servicesCloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeCreateSlotPoolMetadata

type CreateSlotPoolMetadata struct {// SlotPool: Resource name of the slot pool that is being created. E.g.,// projects/myproject/locations/us-central1/reservations/foo/slotPools/12// 3SlotPoolstring `json:"slotPool,omitempty"`// ForceSendFields is a list of field names (e.g. "SlotPool") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "SlotPool") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

CreateSlotPoolMetadata: The metadata for operation returned fromReservationService.CreateSlotPool.

func (*CreateSlotPoolMetadata)MarshalJSON

func (s *CreateSlotPoolMetadata) MarshalJSON() ([]byte,error)

typeEmpty

type Empty struct {// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`}

Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to useit as the request or the response type of an API method. Forinstance: service Foo { rpc Bar(google.protobuf.Empty) returns(google.protobuf.Empty); } The JSON representation for `Empty` isempty JSON object `{}`.

typeListReservationGrantsResponse

type ListReservationGrantsResponse struct {// NextPageToken: Token to retrieve the next page of results, or empty// if there are no more results in the list.NextPageTokenstring `json:"nextPageToken,omitempty"`// ReservationGrants: List of reservation grants visible to the user.ReservationGrants []*ReservationGrant `json:"reservationGrants,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ListReservationGrantsResponse: The response forReservationService.ListReservationGrants.

func (*ListReservationGrantsResponse)MarshalJSON

func (s *ListReservationGrantsResponse) MarshalJSON() ([]byte,error)

typeListReservationsResponse

type ListReservationsResponse struct {// NextPageToken: Token to retrieve the next page of results, or empty// if there are no more results in the list.NextPageTokenstring `json:"nextPageToken,omitempty"`// Reservations: List of reservations visible to the user.Reservations []*Reservation `json:"reservations,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ListReservationsResponse: The response forReservationService.ListReservations.

func (*ListReservationsResponse)MarshalJSON

func (s *ListReservationsResponse) MarshalJSON() ([]byte,error)

typeListSlotPoolsResponse

type ListSlotPoolsResponse struct {// NextPageToken: Token to retrieve the next page of results, or empty// if there are no more results in the list.NextPageTokenstring `json:"nextPageToken,omitempty"`// SlotPools: List of slot pools visible to the user.SlotPools []*SlotPool `json:"slotPools,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ListSlotPoolsResponse: The response forReservationService.ListSlotPools.

func (*ListSlotPoolsResponse)MarshalJSON

func (s *ListSlotPoolsResponse) MarshalJSON() ([]byte,error)

typeOperation

type Operation struct {// Done: If the value is `false`, it means the operation is still in// progress. If `true`, the operation is completed, and either `error`// or `response` is available.Donebool `json:"done,omitempty"`// Error: The error result of the operation in case of failure or// cancellation.Error *Status `json:"error,omitempty"`// Metadata: Service-specific metadata associated with the operation. It// typically contains progress information and common metadata such as// create time. Some services might not provide such metadata. Any// method that returns a long-running operation should document the// metadata type, if any.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: The server-assigned name, which is only unique within the same// service that originally returns it. If you use the default HTTP// mapping, the `name` should be a resource name ending with// `operations/{unique_id}`.Namestring `json:"name,omitempty"`// Response: The normal response of the operation in case of success. If// the original method returns no data on success, such as `Delete`, the// response is `google.protobuf.Empty`. If the original method is// standard `Get`/`Create`/`Update`, the response should be the// resource. For other methods, the response should have the type// `XxxResponse`, where `Xxx` is the original method name. For example,// if the original method name is `TakeSnapshot()`, the inferred// response type is `TakeSnapshotResponse`.Responsegoogleapi.RawMessage `json:"response,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Done") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Done") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Operation: This resource represents a long-running operation that isthe result of a network API call.

func (*Operation)MarshalJSON

func (s *Operation) MarshalJSON() ([]byte,error)

typeProjectsLocationsOperationsCancelCall

type ProjectsLocationsOperationsCancelCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsOperationsCancelCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsOperationsCancelCall)Do

Do executes the "bigqueryreservation.projects.locations.operations.cancel" call.Exactly one of *Empty or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ProjectsLocationsOperationsCancelCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsOperationsCancelCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeProjectsLocationsOperationsGetCall

type ProjectsLocationsOperationsGetCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsOperationsGetCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsOperationsGetCall)Do

Do executes the "bigqueryreservation.projects.locations.operations.get" call.Exactly one of *Operation or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsOperationsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsOperationsGetCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsOperationsGetCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeProjectsLocationsOperationsService

type ProjectsLocationsOperationsService struct {// contains filtered or unexported fields}

func (*ProjectsLocationsOperationsService)Cancel

Cancel: Starts asynchronous cancellation on a long-running operation.The server makes a best effort to cancel the operation, but successis not guaranteed. If the server doesn't support this method, itreturns `google.rpc.Code.UNIMPLEMENTED`. Clients can useOperations.GetOperation or other methods to check whether thecancellation succeeded or whether the operation completed despitecancellation. On successful cancellation, the operation is notdeleted; instead, it becomes an operation with an Operation.errorvalue with a google.rpc.Status.code of 1, corresponding to`Code.CANCELLED`.

func (*ProjectsLocationsOperationsService)Get

Get: Gets the latest state of a long-running operation. Clients canuse this method to poll the operation result at intervals asrecommended by the API service.

typeProjectsLocationsReservationGrantsCreateCall

type ProjectsLocationsReservationGrantsCreateCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationGrantsCreateCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationGrantsCreateCall)Do

Do executes the "bigqueryreservation.projects.locations.reservationGrants.create" call.Exactly one of *ReservationGrant or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ReservationGrant.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ProjectsLocationsReservationGrantsCreateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationGrantsCreateCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeProjectsLocationsReservationGrantsDeleteCall

type ProjectsLocationsReservationGrantsDeleteCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationGrantsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationGrantsDeleteCall)Do

Do executes the "bigqueryreservation.projects.locations.reservationGrants.delete" call.Exactly one of *Empty or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ProjectsLocationsReservationGrantsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationGrantsDeleteCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeProjectsLocationsReservationGrantsListCall

type ProjectsLocationsReservationGrantsListCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationGrantsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationGrantsListCall)Do

Do executes the "bigqueryreservation.projects.locations.reservationGrants.list" call.Exactly one of *ListReservationGrantsResponse or error will benon-nil. Any non-2xx status code is an error. Response headers are ineither *ListReservationGrantsResponse.ServerResponse.Header or (if aresponse was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ProjectsLocationsReservationGrantsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationGrantsListCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationGrantsListCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*ProjectsLocationsReservationGrantsListCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum numberof items to return.

func (*ProjectsLocationsReservationGrantsListCall)PageToken

PageToken sets the optional parameter "pageToken": Thenext_page_token value returned from a previous List request, if any.

func (*ProjectsLocationsReservationGrantsListCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeProjectsLocationsReservationGrantsService

type ProjectsLocationsReservationGrantsService struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationGrantsService)Create

Create: Returns `google.rpc.Code.PERMISSION_DENIED` if user does nothave 'bigquery.admin' permissions on the project using thereservation and the project that owns this reservation. Returns`google.rpc.Code.INVALID_ARGUMENT` when location of the grant doesnot match location of the reservation.

func (*ProjectsLocationsReservationGrantsService)Delete

Delete: Deletes a reservation grant. No expansion will happen. E.g:organizationA contains project1 and project2. Reservation res1exists. CreateReservationGrant was invoked previously and followinggrants were created explicitly: Then deletion of won't affect . Afterdeletion of , queries from project1 will still use res1, whilequeries from project2 will use on-demand mode.

func (*ProjectsLocationsReservationGrantsService)List

List: Lists reservation grants. Only explicitly created grants willbe returned. E.g: organizationA contains project1 and project2.Reservation res1 exists. CreateReservationGrant was invokedpreviously and following grants were created explicitly: Then thisAPI will just return the above two grants for reservation res1, andno expansion/merge will happen.

typeProjectsLocationsReservationsCreateCall

type ProjectsLocationsReservationsCreateCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsCreateCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsCreateCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.create" call.Exactly one of *Reservation or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Reservation.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsReservationsCreateCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsCreateCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsCreateCall)ReservationId

ReservationId sets the optional parameter "reservationId": Thereservation ID relative to the parent, e.g., "dev". This field mustonly contain alphanumeric characters.

typeProjectsLocationsReservationsCreateReservationCall

type ProjectsLocationsReservationsCreateReservationCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsCreateReservationCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsCreateReservationCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.createReservation" call.Exactly one of *Reservation or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Reservation.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsReservationsCreateReservationCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsCreateReservationCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsCreateReservationCall)ReservationId

ReservationId sets the optional parameter "reservationId": Thereservation ID relative to the parent, e.g., "dev". This field mustonly contain alphanumeric characters.

typeProjectsLocationsReservationsDeleteCall

type ProjectsLocationsReservationsDeleteCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsDeleteCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.delete" call.Exactly one of *Empty or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ProjectsLocationsReservationsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsDeleteCall)Force

Force sets the optional parameter "force": If true, deletes all thechild reservations of the given reservation. Otherwise, attempting todelete a reservation that has child reservations will fail with errorcode `google.rpc.Code.FAILED_PRECONDITION`.

func (*ProjectsLocationsReservationsDeleteCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeProjectsLocationsReservationsGetCall

type ProjectsLocationsReservationsGetCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsGetCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsGetCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.get" call.Exactly one of *Reservation or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Reservation.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsReservationsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsGetCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsGetCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeProjectsLocationsReservationsListCall

type ProjectsLocationsReservationsListCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsListCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.list" call.Exactly one of *ListReservationsResponse or error will be non-nil.Any non-2xx status code is an error. Response headers are in either*ListReservationsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ProjectsLocationsReservationsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsListCall)Filter

Filter sets the optional parameter "filter": Can be used to filterout reservations based on names, capacity, etc, e.g.:filter="reservation.slot_capacity > 200" filter="reservation.name =\"*dev/*\"" Advanced filtering syntax can be[here](https://cloud.google.com/logging/docs/view/advanced-filters).

func (*ProjectsLocationsReservationsListCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsListCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*ProjectsLocationsReservationsListCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum numberof items to return.

func (*ProjectsLocationsReservationsListCall)PageToken

PageToken sets the optional parameter "pageToken": Thenext_page_token value returned from a previous List request, if any.

func (*ProjectsLocationsReservationsListCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeProjectsLocationsReservationsPatchCall

type ProjectsLocationsReservationsPatchCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsPatchCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsPatchCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.patch" call.Exactly one of *Reservation or error will be non-nil. Any non-2xxstatus code is an error. Response headers are in either*Reservation.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsReservationsPatchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsPatchCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsPatchCall)UpdateMask

UpdateMask sets the optional parameter "updateMask": Standard fieldmask for the set of fields to be updated.

typeProjectsLocationsReservationsService

type ProjectsLocationsReservationsService struct {SlotPools *ProjectsLocationsReservationsSlotPoolsService// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsService)Create

Create: Creates a new reservation resource. Multiple reservations arecreated if the ancestor reservations do not exist.

func (*ProjectsLocationsReservationsService)CreateReservation

CreateReservation: Creates a new reservation resource. Multiplereservations are created if the ancestor reservations do not exist.

func (*ProjectsLocationsReservationsService)Delete

Delete: Deletes a reservation. Returns`google.rpc.Code.FAILED_PRECONDITION` in the following cases: 1. Whenreservation has child reservations. This check can be bypassed bysetting DeleteReservationRequest.force flag to true. 2. Whentop-level reservation with slot pools is being deleted.

func (*ProjectsLocationsReservationsService)Get

Get: Returns information about the reservation.

func (*ProjectsLocationsReservationsService)List

List: Lists all the reservations for the project in the specifiedlocation.

func (*ProjectsLocationsReservationsService)Patch

Patch: Updates an existing reservation resource. Applicable only forchild reservations.

typeProjectsLocationsReservationsSlotPoolsDeleteCall

type ProjectsLocationsReservationsSlotPoolsDeleteCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsSlotPoolsDeleteCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsSlotPoolsDeleteCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.slotPools.delete" call.Exactly one of *Empty or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModifiedwas returned.

func (*ProjectsLocationsReservationsSlotPoolsDeleteCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsSlotPoolsDeleteCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

typeProjectsLocationsReservationsSlotPoolsGetCall

type ProjectsLocationsReservationsSlotPoolsGetCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsSlotPoolsGetCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsSlotPoolsGetCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.slotPools.get" call.Exactly one of *SlotPool or error will be non-nil. Any non-2xx statuscode is an error. Response headers are in either*SlotPool.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModifiedto check whether the returned error was becausehttp.StatusNotModified was returned.

func (*ProjectsLocationsReservationsSlotPoolsGetCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsSlotPoolsGetCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsSlotPoolsGetCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

typeProjectsLocationsReservationsSlotPoolsListCall

type ProjectsLocationsReservationsSlotPoolsListCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsSlotPoolsListCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsReservationsSlotPoolsListCall)Do

Do executes the "bigqueryreservation.projects.locations.reservations.slotPools.list" call.Exactly one of *ListSlotPoolsResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*ListSlotPoolsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ProjectsLocationsReservationsSlotPoolsListCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsReservationsSlotPoolsListCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsReservationsSlotPoolsListCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*ProjectsLocationsReservationsSlotPoolsListCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum numberof items to return.

func (*ProjectsLocationsReservationsSlotPoolsListCall)PageToken

PageToken sets the optional parameter "pageToken": Thenext_page_token value returned from a previous List request, if any.

func (*ProjectsLocationsReservationsSlotPoolsListCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeProjectsLocationsReservationsSlotPoolsService

type ProjectsLocationsReservationsSlotPoolsService struct {// contains filtered or unexported fields}

func (*ProjectsLocationsReservationsSlotPoolsService)Delete

Delete: Deletes a slot pool. Attempting to delete slot pool beforeits commitment_end_time will fail with the error code`google.rpc.Code.FAILED_PRECONDITION`.

func (*ProjectsLocationsReservationsSlotPoolsService)Get

Get: Returns information about the slot pool.

func (*ProjectsLocationsReservationsSlotPoolsService)List

List: Lists all the slot pools for the reservation.

typeProjectsLocationsSearchReservationGrantsCall

type ProjectsLocationsSearchReservationGrantsCall struct {// contains filtered or unexported fields}

func (*ProjectsLocationsSearchReservationGrantsCall)Context

Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.

func (*ProjectsLocationsSearchReservationGrantsCall)Do

Do executes the "bigqueryreservation.projects.locations.searchReservationGrants" call.Exactly one of *SearchReservationGrantsResponse or error will benon-nil. Any non-2xx status code is an error. Response headers are ineither *SearchReservationGrantsResponse.ServerResponse.Header or (ifa response was returned at all) in error.(*googleapi.Error).Header.Use googleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.

func (*ProjectsLocationsSearchReservationGrantsCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.

func (*ProjectsLocationsSearchReservationGrantsCall)Header

Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.

func (*ProjectsLocationsSearchReservationGrantsCall)IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operationfail if the object's ETag matches the given value. This is useful forgetting updates only after the object has changed since the lastrequest. Use googleapi.IsNotModified to check whether the responseerror from Do is the result of In-None-Match.

func (*ProjectsLocationsSearchReservationGrantsCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum numberof items to return.

func (*ProjectsLocationsSearchReservationGrantsCall)PageToken

PageToken sets the optional parameter "pageToken": Thenext_page_token value returned from a previous List request, if any.

func (*ProjectsLocationsSearchReservationGrantsCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

func (*ProjectsLocationsSearchReservationGrantsCall)Query

Query sets the optional parameter "query": Please specify resourcename as grantee in the query. e.g., "grantee=projects/myproject""grantee=folders/123" "grantee=organizations/456"

typeProjectsLocationsService

type ProjectsLocationsService struct {Operations *ProjectsLocationsOperationsServiceReservationGrants *ProjectsLocationsReservationGrantsServiceReservations *ProjectsLocationsReservationsService// contains filtered or unexported fields}

funcNewProjectsLocationsService

func NewProjectsLocationsService(s *Service) *ProjectsLocationsService

func (*ProjectsLocationsService)SearchReservationGrants

SearchReservationGrants: Look up grants for a specified resource fora particular region. If the request is about a project: 1) Grantscreated on the project will be returned if they exist. 2) Otherwisegrants created on the closest ancestor will be returned. 3) Grantsfor different JobTypes will all be returned. Same logic applies ifthe request is about a folder. If the request is about anorganization, then grants created on the organization will bereturned (organization doesn't have ancestors). Comparing toListReservationGrants, there are two behavior differences: 1)permission on the grantee will be verified in this API. 2) Hierarchylookup (project->folder->organization) happens in this API.

typeProjectsService

type ProjectsService struct {Locations *ProjectsLocationsService// contains filtered or unexported fields}

funcNewProjectsService

func NewProjectsService(s *Service) *ProjectsService

typeReservation

type Reservation struct {// Name: The resource name of the reservation, e.g.,// "projects/*/locations/*/reservations/dev/team/product". Reservation// names (e.g., "dev/team/product") exceeding a depth of six will fail// with `google.rpc.Code.INVALID_ARGUMENT`.Namestring `json:"name,omitempty"`// SlotCapacity: Maximum slots available to this reservation and its// children. A slot is a unit of computational power in BigQuery, and// serves as the unit of parallelism. In a scan of a multi-partitioned// table, a single slot operates on a single partition of the table. If// the new reservation's slot capacity exceed the parent's slot capacity// or if total slot capacity of the new reservation and its siblings// exceeds the parent's slot capacity, the request will fail with// `google.rpc.Code.RESOURCE_EXHAUSTED`.SlotCapacityint64 `json:"slotCapacity,omitempty,string"`// UseParentReservation: If true, any query using this reservation will// also be submitted to the parent reservation. This allows the query to// share the additional slot capacity of the parent with other queries// in the parent reservation. If the parent also has this field set to// true, then this process will continue until it encounters a// reservation for which this is false. If false, a query using this// reservation will execute with the maximum slot capacity as specified// above. If not specified, default value is true. Ignored for top-level// reservation.UseParentReservationbool `json:"useParentReservation,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Name") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Name") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Reservation: A reservation is a mechanism used to guarantee slots tousers.

func (*Reservation)MarshalJSON

func (s *Reservation) MarshalJSON() ([]byte,error)

typeReservationGrant

type ReservationGrant struct {// Grantee: The resource which will use the reservation. E.g.// projects/myproject, folders/123, organizations/456.Granteestring `json:"grantee,omitempty"`// JobType: Which type of jobs will use the reservation.//// Possible values://   "JOB_TYPE_UNSPECIFIED" - Invalid type. Requests with this value// will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.//   "PIPELINE" - Pipeline (load/export) jobs from the project will use// the reservation.//   "QUERY" - Query jobs from the project will use the reservation.JobTypestring `json:"jobType,omitempty"`// Name: Output only. Name of the resource. E.g.:// projects/myproject/locations/eu/reservationGrants/123.Namestring `json:"name,omitempty"`// Reservation: Resource name of the reservation. E.g.,// projects/myproject/locations/eu/reservations/my_reservation. This// reservation must be in the same location as the grant. This// reservation should belong to the same parent project.Reservationstring `json:"reservation,omitempty"`// State: Output only. State of the ReservationGrant.//// Possible values://   "STATE_UNSPECIFIED" - Invalid state value.//   "PENDING" - Queries from grantee will be executed as on-demand, if// related ReservationGrant is pending.//   "ACTIVE" - ReservationGrant is ready.Statestring `json:"state,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Grantee") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Grantee") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

ReservationGrant: A ReservationGrant allows a project to submit jobsof a certain type using slots from the specified reservation.

func (*ReservationGrant)MarshalJSON

func (s *ReservationGrant) MarshalJSON() ([]byte,error)

typeSearchReservationGrantsResponse

type SearchReservationGrantsResponse struct {// NextPageToken: Token to retrieve the next page of results, or empty// if there are no more results in the list.NextPageTokenstring `json:"nextPageToken,omitempty"`// ReservationGrants: List of reservation grants visible to the user.ReservationGrants []*ReservationGrant `json:"reservationGrants,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

SearchReservationGrantsResponse: The response forReservationService.SearchReservationGrants.

func (*SearchReservationGrantsResponse)MarshalJSON

func (s *SearchReservationGrantsResponse) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentProjects *ProjectsService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewService

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

typeSlotPool

type SlotPool struct {// CommitmentEndTime: Output only. The end of the commitment period.// Slot pool cannot be removed before commitment_end_time. It is// applicable only for ACTIVE slot pools and is computed as a// combination of the plan and the time when the slot pool became// ACTIVE.CommitmentEndTimestring `json:"commitmentEndTime,omitempty"`// FailureStatus: Output only. For FAILED slot pool, provides the reason// of failure.FailureStatus *Status `json:"failureStatus,omitempty"`// Name: Output only. The resource name of the slot pool, e.g.,// projects/myproject/locations/us-central1/reservations/myreservation/sl// otPools/123Namestring `json:"name,omitempty"`// Plan: Slot pool commitment plan.//// Possible values://   "COMMITMENT_PLAN_UNSPECIFIED" - Invalid plan value. Requests with// this value will be rejected with error code// `google.rpc.Code.INVALID_ARGUMENT`.//   "FLEX" - Slot pool can be removed at any point, even after becoming// ACTIVE.//   "TRIAL" - Trial commitments have a committed period of 182 days// after becoming ACTIVE. After that, they are converted to a new// commitment based on the renewal_plan. Default renewal_plan for Trial// commitment is Flex so that it can be deleted right after committed// period ends.//   "MONTHLY" - Slot pool cannot be removed for 30 days after becoming// ACTIVE.//   "ANNUAL" - Slot pool cannot be removed for 365 days after becoming// ACTIVE. Note: annual commitments are automatically downgraded to// monthly after 365 days.Planstring `json:"plan,omitempty"`// SlotCount: Number of slots in this pool.SlotCountint64 `json:"slotCount,omitempty,string"`// State: Output only.//// Possible values://   "STATE_UNSPECIFIED" - Invalid state value.//   "PENDING" - Slot pool is pending provisioning. Pending slot pool// does not contribute to the parent's slot_capacity.//   "ACTIVE" - Once slots are provisioned, slot pool becomes active.// slot_count is added to the parent's slot_capacity.//   "FAILED" - Slot pool is failed to be activated by the backend.Statestring `json:"state,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CommitmentEndTime")// to unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CommitmentEndTime") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}

SlotPool: Slot pool is a way to purchase slots with some minimumcommitted period of usage. Slot pool is immutable and cannot bedeleted until the end of the commitment period. After the end of thecommitment period, slots are still available but can be freelyremoved any time. Annual commitments will automatically be downgradedto monthly after the commitment ends. A slot pool resource exists asa child resource of a top-level reservation. Sum of all the ACTIVEpools slot_count is always equal to the reservation slot_capacity.

func (*SlotPool)MarshalJSON

func (s *SlotPool) MarshalJSON() ([]byte,error)

typeStatus

type Status struct {// Code: The status code, which should be an enum value of// google.rpc.Code.Codeint64 `json:"code,omitempty"`// Details: A list of messages that carry the error details. There is a// common set of message types for APIs to use.Details []googleapi.RawMessage `json:"details,omitempty"`// Message: A developer-facing error message, which should be in// English. Any user-facing error message should be localized and sent// in the google.rpc.Status.details field, or localized by the client.Messagestring `json:"message,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}

Status: The `Status` type defines a logical error model that issuitable for different programming environments, including REST APIsand RPC APIs. It is used by [gRPC](https://github.com/grpc). Each`Status` message contains three pieces of data: error code, errormessage, and error details. You can find out more about this errormodel and how to work with it in the [API DesignGuide](https://cloud.google.com/apis/design/errors).

func (*Status)MarshalJSON

func (s *Status) MarshalJSON() ([]byte,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp