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/v1beta1" ... 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, see https://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)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- Constants
- type Assignment
- type BiReservation
- type CapacityCommitment
- type Empty
- type ListAssignmentsResponse
- type ListCapacityCommitmentsResponse
- type ListLocationsResponse
- type ListReservationsResponse
- type Location
- type LocationMetadata
- type MoveAssignmentRequest
- type ProjectsLocationsCapacityCommitmentsCreateCall
- func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsCreateCall
- func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Do(opts ...googleapi.CallOption) (*CapacityCommitment, error)
- func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsCreateCall
- func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Header() http.Header
- type ProjectsLocationsCapacityCommitmentsDeleteCall
- func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsDeleteCall
- func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsDeleteCall
- func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Header() http.Header
- type ProjectsLocationsCapacityCommitmentsGetCall
- func (c *ProjectsLocationsCapacityCommitmentsGetCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsGetCall
- func (c *ProjectsLocationsCapacityCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*CapacityCommitment, error)
- func (c *ProjectsLocationsCapacityCommitmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsGetCall
- func (c *ProjectsLocationsCapacityCommitmentsGetCall) Header() http.Header
- func (c *ProjectsLocationsCapacityCommitmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCapacityCommitmentsGetCall
- type ProjectsLocationsCapacityCommitmentsListCall
- func (c *ProjectsLocationsCapacityCommitmentsListCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsListCall
- func (c *ProjectsLocationsCapacityCommitmentsListCall) Do(opts ...googleapi.CallOption) (*ListCapacityCommitmentsResponse, error)
- func (c *ProjectsLocationsCapacityCommitmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsListCall
- func (c *ProjectsLocationsCapacityCommitmentsListCall) Header() http.Header
- func (c *ProjectsLocationsCapacityCommitmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCapacityCommitmentsListCall
- func (c *ProjectsLocationsCapacityCommitmentsListCall) PageSize(pageSize int64) *ProjectsLocationsCapacityCommitmentsListCall
- func (c *ProjectsLocationsCapacityCommitmentsListCall) PageToken(pageToken string) *ProjectsLocationsCapacityCommitmentsListCall
- func (c *ProjectsLocationsCapacityCommitmentsListCall) Pages(ctx context.Context, f func(*ListCapacityCommitmentsResponse) error) error
- type ProjectsLocationsCapacityCommitmentsService
- func (r *ProjectsLocationsCapacityCommitmentsService) Create(parent string, capacitycommitment *CapacityCommitment) *ProjectsLocationsCapacityCommitmentsCreateCall
- func (r *ProjectsLocationsCapacityCommitmentsService) Delete(name string) *ProjectsLocationsCapacityCommitmentsDeleteCall
- func (r *ProjectsLocationsCapacityCommitmentsService) Get(name string) *ProjectsLocationsCapacityCommitmentsGetCall
- func (r *ProjectsLocationsCapacityCommitmentsService) List(parent string) *ProjectsLocationsCapacityCommitmentsListCall
- type ProjectsLocationsGetBiReservationCall
- func (c *ProjectsLocationsGetBiReservationCall) Context(ctx context.Context) *ProjectsLocationsGetBiReservationCall
- func (c *ProjectsLocationsGetBiReservationCall) Do(opts ...googleapi.CallOption) (*BiReservation, error)
- func (c *ProjectsLocationsGetBiReservationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetBiReservationCall
- func (c *ProjectsLocationsGetBiReservationCall) Header() http.Header
- func (c *ProjectsLocationsGetBiReservationCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetBiReservationCall
- type ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error)
- func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall
- func (c *ProjectsLocationsGetCall) Header() http.Header
- func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall
- type ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error)
- func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Header() http.Header
- func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall
- func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error
- type ProjectsLocationsReservationsAssignmentsCreateCall
- func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsCreateCall
- func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Do(opts ...googleapi.CallOption) (*Assignment, error)
- func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsCreateCall
- func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Header() http.Header
- type ProjectsLocationsReservationsAssignmentsDeleteCall
- func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsDeleteCall
- func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsDeleteCall
- func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Header() http.Header
- type ProjectsLocationsReservationsAssignmentsListCall
- func (c *ProjectsLocationsReservationsAssignmentsListCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsListCall
- func (c *ProjectsLocationsReservationsAssignmentsListCall) Do(opts ...googleapi.CallOption) (*ListAssignmentsResponse, error)
- func (c *ProjectsLocationsReservationsAssignmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsListCall
- func (c *ProjectsLocationsReservationsAssignmentsListCall) Header() http.Header
- func (c *ProjectsLocationsReservationsAssignmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReservationsAssignmentsListCall
- func (c *ProjectsLocationsReservationsAssignmentsListCall) PageSize(pageSize int64) *ProjectsLocationsReservationsAssignmentsListCall
- func (c *ProjectsLocationsReservationsAssignmentsListCall) PageToken(pageToken string) *ProjectsLocationsReservationsAssignmentsListCall
- func (c *ProjectsLocationsReservationsAssignmentsListCall) Pages(ctx context.Context, f func(*ListAssignmentsResponse) error) error
- type ProjectsLocationsReservationsAssignmentsMoveCall
- func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsMoveCall
- func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Do(opts ...googleapi.CallOption) (*Assignment, error)
- func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsMoveCall
- func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Header() http.Header
- type ProjectsLocationsReservationsAssignmentsService
- func (r *ProjectsLocationsReservationsAssignmentsService) Create(parent string, assignment *Assignment) *ProjectsLocationsReservationsAssignmentsCreateCall
- func (r *ProjectsLocationsReservationsAssignmentsService) Delete(name string) *ProjectsLocationsReservationsAssignmentsDeleteCall
- func (r *ProjectsLocationsReservationsAssignmentsService) List(parent string) *ProjectsLocationsReservationsAssignmentsListCall
- func (r *ProjectsLocationsReservationsAssignmentsService) Move(name string, moveassignmentrequest *MoveAssignmentRequest) *ProjectsLocationsReservationsAssignmentsMoveCall
- type ProjectsLocationsReservationsCreateCall
- func (c *ProjectsLocationsReservationsCreateCall) Context(ctx context.Context) *ProjectsLocationsReservationsCreateCall
- func (c *ProjectsLocationsReservationsCreateCall) Do(opts ...googleapi.CallOption) (*Reservation, error)
- func (c *ProjectsLocationsReservationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsCreateCall
- func (c *ProjectsLocationsReservationsCreateCall) Header() http.Header
- func (c *ProjectsLocationsReservationsCreateCall) ReservationId(reservationId string) *ProjectsLocationsReservationsCreateCall
- type ProjectsLocationsReservationsDeleteCall
- func (c *ProjectsLocationsReservationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReservationsDeleteCall
- func (c *ProjectsLocationsReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *ProjectsLocationsReservationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsDeleteCall
- func (c *ProjectsLocationsReservationsDeleteCall) Header() http.Header
- type ProjectsLocationsReservationsGetCall
- func (c *ProjectsLocationsReservationsGetCall) Context(ctx context.Context) *ProjectsLocationsReservationsGetCall
- func (c *ProjectsLocationsReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, error)
- func (c *ProjectsLocationsReservationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsGetCall
- func (c *ProjectsLocationsReservationsGetCall) Header() http.Header
- func (c *ProjectsLocationsReservationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReservationsGetCall
- type ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) Context(ctx context.Context) *ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) Do(opts ...googleapi.CallOption) (*ListReservationsResponse, error)
- func (c *ProjectsLocationsReservationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) Filter(filter string) *ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) Header() http.Header
- func (c *ProjectsLocationsReservationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) PageSize(pageSize int64) *ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) PageToken(pageToken string) *ProjectsLocationsReservationsListCall
- func (c *ProjectsLocationsReservationsListCall) Pages(ctx context.Context, f func(*ListReservationsResponse) error) error
- type ProjectsLocationsReservationsPatchCall
- func (c *ProjectsLocationsReservationsPatchCall) Context(ctx context.Context) *ProjectsLocationsReservationsPatchCall
- func (c *ProjectsLocationsReservationsPatchCall) Do(opts ...googleapi.CallOption) (*Reservation, error)
- func (c *ProjectsLocationsReservationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsPatchCall
- func (c *ProjectsLocationsReservationsPatchCall) Header() http.Header
- func (c *ProjectsLocationsReservationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReservationsPatchCall
- type ProjectsLocationsReservationsService
- func (r *ProjectsLocationsReservationsService) Create(parent string, reservation *Reservation) *ProjectsLocationsReservationsCreateCall
- func (r *ProjectsLocationsReservationsService) Delete(name string) *ProjectsLocationsReservationsDeleteCall
- func (r *ProjectsLocationsReservationsService) Get(name string) *ProjectsLocationsReservationsGetCall
- func (r *ProjectsLocationsReservationsService) List(parent string) *ProjectsLocationsReservationsListCall
- func (r *ProjectsLocationsReservationsService) Patch(name string, reservation *Reservation) *ProjectsLocationsReservationsPatchCall
- type ProjectsLocationsSearchAssignmentsCall
- func (c *ProjectsLocationsSearchAssignmentsCall) Context(ctx context.Context) *ProjectsLocationsSearchAssignmentsCall
- func (c *ProjectsLocationsSearchAssignmentsCall) Do(opts ...googleapi.CallOption) (*SearchAssignmentsResponse, error)
- func (c *ProjectsLocationsSearchAssignmentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchAssignmentsCall
- func (c *ProjectsLocationsSearchAssignmentsCall) Header() http.Header
- func (c *ProjectsLocationsSearchAssignmentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsSearchAssignmentsCall
- func (c *ProjectsLocationsSearchAssignmentsCall) PageSize(pageSize int64) *ProjectsLocationsSearchAssignmentsCall
- func (c *ProjectsLocationsSearchAssignmentsCall) PageToken(pageToken string) *ProjectsLocationsSearchAssignmentsCall
- func (c *ProjectsLocationsSearchAssignmentsCall) Pages(ctx context.Context, f func(*SearchAssignmentsResponse) error) error
- func (c *ProjectsLocationsSearchAssignmentsCall) Query(query string) *ProjectsLocationsSearchAssignmentsCall
- type ProjectsLocationsService
- func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall
- func (r *ProjectsLocationsService) GetBiReservation(name string) *ProjectsLocationsGetBiReservationCall
- func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall
- func (r *ProjectsLocationsService) SearchAssignments(parent string) *ProjectsLocationsSearchAssignmentsCall
- func (r *ProjectsLocationsService) UpdateBiReservation(name string, bireservation *BiReservation) *ProjectsLocationsUpdateBiReservationCall
- type ProjectsLocationsUpdateBiReservationCall
- func (c *ProjectsLocationsUpdateBiReservationCall) Context(ctx context.Context) *ProjectsLocationsUpdateBiReservationCall
- func (c *ProjectsLocationsUpdateBiReservationCall) Do(opts ...googleapi.CallOption) (*BiReservation, error)
- func (c *ProjectsLocationsUpdateBiReservationCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateBiReservationCall
- func (c *ProjectsLocationsUpdateBiReservationCall) Header() http.Header
- func (c *ProjectsLocationsUpdateBiReservationCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateBiReservationCall
- type ProjectsService
- type Reservation
- type SearchAssignmentsResponse
- type Service
- type Status
Constants ¶
const ( // View and manage your data in Google BigQuery BigqueryScope = "https://www.googleapis.com/auth/bigquery" // View and manage your data across Google Cloud Platform services CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignment ¶
type Assignment struct { // Assignee: The resource which will use the reservation. // E.g. // projects/myproject, folders/123, organizations/456. Assignee string `json:"assignee,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. JobType string `json:"jobType,omitempty"` // Name: Output only. Name of the resource. // E.g.: // projects/myproject/locations/US/reservations/team1-prod/assignme // nts/123. Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Assignee") 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. "Assignee") 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:"-"` }
Assignment: A Assignment allows a project to submit jobs of a certain type using slots from the specified reservation.
func (*Assignment) MarshalJSON ¶
func (s *Assignment) MarshalJSON() ([]byte, error)
type BiReservation ¶ added in v0.14.0
type BiReservation struct { // Name: The resource name of the singleton BI reservation. // Reservation names have the // form // `projects/{project_id}/locations/{location_id}/bireservation`. Name string `json:"name,omitempty"` // Size: Size of a reservation, in bytes. Size int64 `json:"size,omitempty,string"` // UpdateTime: Output only. The last update timestamp of a reservation. UpdateTime string `json:"updateTime,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:"-"` }
BiReservation: Represents a BI Reservation.
func (*BiReservation) MarshalJSON ¶ added in v0.14.0
func (s *BiReservation) MarshalJSON() ([]byte, error)
type CapacityCommitment ¶
type CapacityCommitment struct { // CommitmentEndTime: Output only. The end of the commitment period. // Capacity commitment cannot be // removed before commitment_end_time. It is applicable only for // ACTIVE // capacity commitments and is computed as a combination of the plan and // the // time when the capacity commitment became ACTIVE. CommitmentEndTime string `json:"commitmentEndTime,omitempty"` // FailureStatus: Output only. For FAILED commitment plan, provides the // reason of failure. FailureStatus *Status `json:"failureStatus,omitempty"` // Name: Output only. The resource name of the capacity commitment, // e.g., // projects/myproject/locations/US/capacityCommitments/123 Name string `json:"name,omitempty"` // Plan: Capacity commitment 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`. // "MONTHLY" - Capacity commitment cannot be removed for 30 days after // becoming ACTIVE. // "ANNUAL" - Capacity commitment cannot be removed for 365 days after // becoming ACTIVE. // Note: annual commitments are automatically downgraded to monthly // after // 365 days. Plan string `json:"plan,omitempty"` // SlotCount: Number of slots in this commitment. SlotCount int64 `json:"slotCount,omitempty,string"` // State: Output only. State of the commitment. // // Possible values: // "STATE_UNSPECIFIED" - Invalid state value. // "PENDING" - Capacity commitment is pending provisioning. Pending // capacity commitment // does not contribute to the parent's slot_capacity. // "ACTIVE" - Once slots are provisioned, capacity commitment becomes // active. // slot_count is added to the parent's slot_capacity. // "FAILED" - Capacity commitment is failed to be activated by the // backend. State string `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:"-"` }
CapacityCommitment: Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some minimum committed period of usage. Capacity commitment is immutable and cannot be deleted until the end of the commitment period. After the end of the commitment period, slots are still available but can be freely removed any time. Annual commitments will automatically be downgraded to monthly after the commitment ends.
A capacity commitment resource exists as a child resource of the admin project.
func (*CapacityCommitment) MarshalJSON ¶
func (s *CapacityCommitment) MarshalJSON() ([]byte, error)
type Empty ¶
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 defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
service Foo { rpc Bar(google.protobuf.Empty) returns
(google.protobuf.Empty);
}
The JSON representation for `Empty` is empty JSON object `{}`.
type ListAssignmentsResponse ¶
type ListAssignmentsResponse struct { // Assignments: List of assignments visible to the user. Assignments []*Assignment `json:"assignments,omitempty"` // NextPageToken: Token to retrieve the next page of results, or empty // if there are no // more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Assignments") 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. "Assignments") 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:"-"` }
ListAssignmentsResponse: The response for ReservationService.ListAssignments.
func (*ListAssignmentsResponse) MarshalJSON ¶
func (s *ListAssignmentsResponse) MarshalJSON() ([]byte, error)
type ListCapacityCommitmentsResponse ¶
type ListCapacityCommitmentsResponse struct { // CapacityCommitments: List of capacity commitments visible to the // user. CapacityCommitments []*CapacityCommitment `json:"capacityCommitments,omitempty"` // NextPageToken: Token to retrieve the next page of results, or empty // if there are no // more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "CapacityCommitments") // 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. "CapacityCommitments") 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:"-"` }
ListCapacityCommitmentsResponse: The response for ReservationService.ListCapacityCommitments.
func (*ListCapacityCommitmentsResponse) MarshalJSON ¶
func (s *ListCapacityCommitmentsResponse) MarshalJSON() ([]byte, error)
type ListLocationsResponse ¶
type ListLocationsResponse struct { // Locations: A list of locations that matches the specified filter in // the request. Locations []*Location `json:"locations,omitempty"` // NextPageToken: The standard List next-page token. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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:"-"` }
ListLocationsResponse: The response message for Locations.ListLocations.
func (*ListLocationsResponse) MarshalJSON ¶
func (s *ListLocationsResponse) MarshalJSON() ([]byte, error)
type ListReservationsResponse ¶
type ListReservationsResponse struct { // NextPageToken: Token to retrieve the next page of results, or empty // if there are no // more results in the list. NextPageToken string `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 for ReservationService.ListReservations.
func (*ListReservationsResponse) MarshalJSON ¶
func (s *ListReservationsResponse) MarshalJSON() ([]byte, error)
type Location ¶
type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. // For example, "Tokyo". DisplayName string `json:"displayName,omitempty"` // Labels: Cross-service attributes for the location. For example // // {"cloud.googleapis.com/region": "us-east1"} Labels map[string]string `json:"labels,omitempty"` // LocationId: The canonical id for this location. For example: // "us-east1". LocationId string `json:"locationId,omitempty"` // Metadata: Service-specific metadata. For example the available // capacity at the given // location. Metadata googleapi.RawMessage `json:"metadata,omitempty"` // Name: Resource name for the location, which may vary between // implementations. // For example: "projects/example-project/locations/us-east1" Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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:"-"` }
Location: A resource that represents Google Cloud Platform location.
func (*Location) MarshalJSON ¶
type LocationMetadata ¶
type LocationMetadata struct { // LegacyLocationId: The legacy BigQuery location ID, e.g. “EU” for // the “europe” location. // This is for any API consumers that need the legacy “US” and // “EU” locations. LegacyLocationId string `json:"legacyLocationId,omitempty"` // ForceSendFields is a list of field names (e.g. "LegacyLocationId") 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. "LegacyLocationId") 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:"-"` }
LocationMetadata: BigQuery-specific metadata about a location. This will be set on google.cloud.location.Location.metadata in Cloud Location API responses.
func (*LocationMetadata) MarshalJSON ¶
func (s *LocationMetadata) MarshalJSON() ([]byte, error)
type MoveAssignmentRequest ¶ added in v0.14.0
type MoveAssignmentRequest struct { // DestinationId: The new reservation ID, e.g.: // projects/myotherproject/locations/US/reservations/team2-prod DestinationId string `json:"destinationId,omitempty"` // ForceSendFields is a list of field names (e.g. "DestinationId") 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. "DestinationId") 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:"-"` }
MoveAssignmentRequest: The request for ReservationService.MoveAssignment. Note: "bigquery.reservationAssignments.create" permission is required on the destination_id. Note: "bigquery.reservationAssignments.create" and "bigquery.reservationAssignments.delete" permission is required on the related assignee.
func (*MoveAssignmentRequest) MarshalJSON ¶ added in v0.14.0
func (s *MoveAssignmentRequest) MarshalJSON() ([]byte, error)
type ProjectsLocationsCapacityCommitmentsCreateCall ¶ added in v0.14.0
type ProjectsLocationsCapacityCommitmentsCreateCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsCapacityCommitmentsCreateCall) Context ¶ added in v0.14.0
func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsCapacityCommitmentsCreateCall) Do ¶ added in v0.14.0
func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Do(opts ...googleapi.CallOption) (*CapacityCommitment, error)
Do executes the "bigqueryreservation.projects.locations.capacityCommitments.create" call. Exactly one of *CapacityCommitment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CapacityCommitment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsCapacityCommitmentsCreateCall) Fields ¶ added in v0.14.0
func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsCapacityCommitmentsCreateCall) Header ¶ added in v0.14.0
func (c *ProjectsLocationsCapacityCommitmentsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsLocationsCapacityCommitmentsDeleteCall ¶
type ProjectsLocationsCapacityCommitmentsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsCapacityCommitmentsDeleteCall) Context ¶
func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsCapacityCommitmentsDeleteCall) Do ¶
func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "bigqueryreservation.projects.locations.capacityCommitments.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsCapacityCommitmentsDeleteCall) Fields ¶
func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsCapacityCommitmentsDeleteCall) Header ¶
func (c *ProjectsLocationsCapacityCommitmentsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsLocationsCapacityCommitmentsGetCall ¶
type ProjectsLocationsCapacityCommitmentsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsCapacityCommitmentsGetCall) Context ¶
func (c *ProjectsLocationsCapacityCommitmentsGetCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsCapacityCommitmentsGetCall) Do ¶
func (c *ProjectsLocationsCapacityCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*CapacityCommitment, error)
Do executes the "bigqueryreservation.projects.locations.capacityCommitments.get" call. Exactly one of *CapacityCommitment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CapacityCommitment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsCapacityCommitmentsGetCall) Fields ¶
func (c *ProjectsLocationsCapacityCommitmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsCapacityCommitmentsGetCall) Header ¶
func (c *ProjectsLocationsCapacityCommitmentsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsCapacityCommitmentsGetCall) IfNoneMatch ¶
func (c *ProjectsLocationsCapacityCommitmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCapacityCommitmentsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type ProjectsLocationsCapacityCommitmentsListCall ¶
type ProjectsLocationsCapacityCommitmentsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsCapacityCommitmentsListCall) Context ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) Context(ctx context.Context) *ProjectsLocationsCapacityCommitmentsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsCapacityCommitmentsListCall) Do ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) Do(opts ...googleapi.CallOption) (*ListCapacityCommitmentsResponse, error)
Do executes the "bigqueryreservation.projects.locations.capacityCommitments.list" call. Exactly one of *ListCapacityCommitmentsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListCapacityCommitmentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsCapacityCommitmentsListCall) Fields ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCapacityCommitmentsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsCapacityCommitmentsListCall) Header ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsCapacityCommitmentsListCall) IfNoneMatch ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCapacityCommitmentsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsCapacityCommitmentsListCall) PageSize ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) PageSize(pageSize int64) *ProjectsLocationsCapacityCommitmentsListCall
PageSize sets the optional parameter "pageSize": The maximum number of items to return.
func (*ProjectsLocationsCapacityCommitmentsListCall) PageToken ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) PageToken(pageToken string) *ProjectsLocationsCapacityCommitmentsListCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*ProjectsLocationsCapacityCommitmentsListCall) Pages ¶
func (c *ProjectsLocationsCapacityCommitmentsListCall) Pages(ctx context.Context, f func(*ListCapacityCommitmentsResponse) error) error
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.
type ProjectsLocationsCapacityCommitmentsService ¶
type ProjectsLocationsCapacityCommitmentsService struct {
// contains filtered or unexported fields
}
func NewProjectsLocationsCapacityCommitmentsService ¶
func NewProjectsLocationsCapacityCommitmentsService(s *Service) *ProjectsLocationsCapacityCommitmentsService
func (*ProjectsLocationsCapacityCommitmentsService) Create ¶ added in v0.14.0
func (r *ProjectsLocationsCapacityCommitmentsService) Create(parent string, capacitycommitment *CapacityCommitment) *ProjectsLocationsCapacityCommitmentsCreateCall
Create: Creates a new capacity commitment resource.
func (*ProjectsLocationsCapacityCommitmentsService) Delete ¶
func (r *ProjectsLocationsCapacityCommitmentsService) Delete(name string) *ProjectsLocationsCapacityCommitmentsDeleteCall
Delete: Deletes a capacity commitment. Attempting to delete capacity commitment before its commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
func (*ProjectsLocationsCapacityCommitmentsService) Get ¶
func (r *ProjectsLocationsCapacityCommitmentsService) Get(name string) *ProjectsLocationsCapacityCommitmentsGetCall
Get: Returns information about the capacity commitment.
func (*ProjectsLocationsCapacityCommitmentsService) List ¶
func (r *ProjectsLocationsCapacityCommitmentsService) List(parent string) *ProjectsLocationsCapacityCommitmentsListCall
List: Lists all the capacity commitments for the admin project.
type ProjectsLocationsGetBiReservationCall ¶ added in v0.14.0
type ProjectsLocationsGetBiReservationCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsGetBiReservationCall) Context ¶ added in v0.14.0
func (c *ProjectsLocationsGetBiReservationCall) Context(ctx context.Context) *ProjectsLocationsGetBiReservationCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsGetBiReservationCall) Do ¶ added in v0.14.0
func (c *ProjectsLocationsGetBiReservationCall) Do(opts ...googleapi.CallOption) (*BiReservation, error)
Do executes the "bigqueryreservation.projects.locations.getBiReservation" call. Exactly one of *BiReservation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BiReservation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGetBiReservationCall) Fields ¶ added in v0.14.0
func (c *ProjectsLocationsGetBiReservationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetBiReservationCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsGetBiReservationCall) Header ¶ added in v0.14.0
func (c *ProjectsLocationsGetBiReservationCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsGetBiReservationCall) IfNoneMatch ¶ added in v0.14.0
func (c *ProjectsLocationsGetBiReservationCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetBiReservationCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type ProjectsLocationsGetCall ¶
type ProjectsLocationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsGetCall) Context ¶
func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsGetCall) Do ¶
func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error)
Do executes the "bigqueryreservation.projects.locations.get" call. Exactly one of *Location or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Location.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsGetCall) Fields ¶
func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsGetCall) Header ¶
func (c *ProjectsLocationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsGetCall) IfNoneMatch ¶
func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type ProjectsLocationsListCall ¶
type ProjectsLocationsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsListCall) Context ¶
func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsListCall) Do ¶
func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error)
Do executes the "bigqueryreservation.projects.locations.list" call. Exactly one of *ListLocationsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListLocationsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsListCall) Fields ¶
func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsListCall) Filter ¶
func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall
Filter sets the optional parameter "filter": The standard list filter.
func (*ProjectsLocationsListCall) Header ¶
func (c *ProjectsLocationsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsListCall) IfNoneMatch ¶
func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsListCall) PageSize ¶
func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall
PageSize sets the optional parameter "pageSize": The standard list page size.
func (*ProjectsLocationsListCall) PageToken ¶
func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall
PageToken sets the optional parameter "pageToken": The standard list page token.
func (*ProjectsLocationsListCall) Pages ¶
func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error
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.
type ProjectsLocationsReservationsAssignmentsCreateCall ¶
type ProjectsLocationsReservationsAssignmentsCreateCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsAssignmentsCreateCall) Context ¶
func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsAssignmentsCreateCall) Do ¶
func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Do(opts ...googleapi.CallOption) (*Assignment, error)
Do executes the "bigqueryreservation.projects.locations.reservations.assignments.create" call. Exactly one of *Assignment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Assignment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsAssignmentsCreateCall) Fields ¶
func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsAssignmentsCreateCall) Header ¶
func (c *ProjectsLocationsReservationsAssignmentsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsLocationsReservationsAssignmentsDeleteCall ¶
type ProjectsLocationsReservationsAssignmentsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsAssignmentsDeleteCall) Context ¶
func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsAssignmentsDeleteCall) Do ¶
func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "bigqueryreservation.projects.locations.reservations.assignments.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsAssignmentsDeleteCall) Fields ¶
func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsAssignmentsDeleteCall) Header ¶
func (c *ProjectsLocationsReservationsAssignmentsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsLocationsReservationsAssignmentsListCall ¶
type ProjectsLocationsReservationsAssignmentsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsAssignmentsListCall) Context ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsAssignmentsListCall) Do ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) Do(opts ...googleapi.CallOption) (*ListAssignmentsResponse, error)
Do executes the "bigqueryreservation.projects.locations.reservations.assignments.list" call. Exactly one of *ListAssignmentsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAssignmentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsAssignmentsListCall) Fields ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsAssignmentsListCall) Header ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsReservationsAssignmentsListCall) IfNoneMatch ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReservationsAssignmentsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsReservationsAssignmentsListCall) PageSize ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) PageSize(pageSize int64) *ProjectsLocationsReservationsAssignmentsListCall
PageSize sets the optional parameter "pageSize": The maximum number of items to return.
func (*ProjectsLocationsReservationsAssignmentsListCall) PageToken ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) PageToken(pageToken string) *ProjectsLocationsReservationsAssignmentsListCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*ProjectsLocationsReservationsAssignmentsListCall) Pages ¶
func (c *ProjectsLocationsReservationsAssignmentsListCall) Pages(ctx context.Context, f func(*ListAssignmentsResponse) error) error
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.
type ProjectsLocationsReservationsAssignmentsMoveCall ¶
type ProjectsLocationsReservationsAssignmentsMoveCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsAssignmentsMoveCall) Context ¶
func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Context(ctx context.Context) *ProjectsLocationsReservationsAssignmentsMoveCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsAssignmentsMoveCall) Do ¶
func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Do(opts ...googleapi.CallOption) (*Assignment, error)
Do executes the "bigqueryreservation.projects.locations.reservations.assignments.move" call. Exactly one of *Assignment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Assignment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsAssignmentsMoveCall) Fields ¶
func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsAssignmentsMoveCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsAssignmentsMoveCall) Header ¶
func (c *ProjectsLocationsReservationsAssignmentsMoveCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsLocationsReservationsAssignmentsService ¶
type ProjectsLocationsReservationsAssignmentsService struct {
// contains filtered or unexported fields
}
func NewProjectsLocationsReservationsAssignmentsService ¶
func NewProjectsLocationsReservationsAssignmentsService(s *Service) *ProjectsLocationsReservationsAssignmentsService
func (*ProjectsLocationsReservationsAssignmentsService) Create ¶
func (r *ProjectsLocationsReservationsAssignmentsService) Create(parent string, assignment *Assignment) *ProjectsLocationsReservationsAssignmentsCreateCall
Create: Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have 'bigquery.admin' permissions on the project using the reservation and the project that owns this reservation. Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match location of the reservation.
func (*ProjectsLocationsReservationsAssignmentsService) Delete ¶
func (r *ProjectsLocationsReservationsAssignmentsService) Delete(name string) *ProjectsLocationsReservationsAssignmentsDeleteCall
Delete: Deletes a assignment. No expansion will happen. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly:
<organizationA, res1> <project1, res1>
Then deletion of <organizationA, res1> won't affect <project1, res1>. After deletion of <organizationA, res1>, queries from project1 will still use res1, while queries from project2 will use on-demand mode.
func (*ProjectsLocationsReservationsAssignmentsService) List ¶
func (r *ProjectsLocationsReservationsAssignmentsService) List(parent string) *ProjectsLocationsReservationsAssignmentsListCall
List: Lists assignments. Only explicitly created assignments will be returned. E.g: organizationA contains project1 and project2. Reservation res1 exists. CreateAssignment was invoked previously and following assignments were created explicitly:
<organizationA, res1> <project1, res1>
Then this API will just return the above two assignments for reservation res1, and no expansion/merge will happen. Wildcard "-" can be used for reservations in the request. In that case all assignments belongs to the specified project and location will be listed. Note "-" cannot be used for projects nor locations.
func (*ProjectsLocationsReservationsAssignmentsService) Move ¶
func (r *ProjectsLocationsReservationsAssignmentsService) Move(name string, moveassignmentrequest *MoveAssignmentRequest) *ProjectsLocationsReservationsAssignmentsMoveCall
Move: Moves a assignment under a new reservation. Customers can do this by deleting the existing assignment followed by creating another assignment under the new reservation, but this method provides a transactional way to do so, to make sure the assignee always has an associated reservation. Without the method customers might see some queries run on-demand which might be unexpected.
type ProjectsLocationsReservationsCreateCall ¶
type ProjectsLocationsReservationsCreateCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsCreateCall) Context ¶
func (c *ProjectsLocationsReservationsCreateCall) Context(ctx context.Context) *ProjectsLocationsReservationsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsCreateCall) Do ¶
func (c *ProjectsLocationsReservationsCreateCall) Do(opts ...googleapi.CallOption) (*Reservation, error)
Do executes the "bigqueryreservation.projects.locations.reservations.create" call. Exactly one of *Reservation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Reservation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsCreateCall) Fields ¶
func (c *ProjectsLocationsReservationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsCreateCall) Header ¶
func (c *ProjectsLocationsReservationsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsReservationsCreateCall) ReservationId ¶
func (c *ProjectsLocationsReservationsCreateCall) ReservationId(reservationId string) *ProjectsLocationsReservationsCreateCall
ReservationId sets the optional parameter "reservationId": The reservation ID. This field must only contain lower case alphanumeric characters or dash.
type ProjectsLocationsReservationsDeleteCall ¶
type ProjectsLocationsReservationsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsDeleteCall) Context ¶
func (c *ProjectsLocationsReservationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsReservationsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsDeleteCall) Do ¶
func (c *ProjectsLocationsReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "bigqueryreservation.projects.locations.reservations.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code 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 to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsDeleteCall) Fields ¶
func (c *ProjectsLocationsReservationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsDeleteCall) Header ¶
func (c *ProjectsLocationsReservationsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type ProjectsLocationsReservationsGetCall ¶
type ProjectsLocationsReservationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsGetCall) Context ¶
func (c *ProjectsLocationsReservationsGetCall) Context(ctx context.Context) *ProjectsLocationsReservationsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsGetCall) Do ¶
func (c *ProjectsLocationsReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, error)
Do executes the "bigqueryreservation.projects.locations.reservations.get" call. Exactly one of *Reservation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Reservation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsGetCall) Fields ¶
func (c *ProjectsLocationsReservationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsGetCall) Header ¶
func (c *ProjectsLocationsReservationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsReservationsGetCall) IfNoneMatch ¶
func (c *ProjectsLocationsReservationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReservationsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type ProjectsLocationsReservationsListCall ¶
type ProjectsLocationsReservationsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsListCall) Context ¶
func (c *ProjectsLocationsReservationsListCall) Context(ctx context.Context) *ProjectsLocationsReservationsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsListCall) Do ¶
func (c *ProjectsLocationsReservationsListCall) Do(opts ...googleapi.CallOption) (*ListReservationsResponse, error)
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 was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsListCall) Fields ¶
func (c *ProjectsLocationsReservationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsListCall) Filter ¶
func (c *ProjectsLocationsReservationsListCall) Filter(filter string) *ProjectsLocationsReservationsListCall
Filter sets the optional parameter "filter": Can be used to filter out 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 ¶
func (c *ProjectsLocationsReservationsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsReservationsListCall) IfNoneMatch ¶
func (c *ProjectsLocationsReservationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReservationsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsReservationsListCall) PageSize ¶
func (c *ProjectsLocationsReservationsListCall) PageSize(pageSize int64) *ProjectsLocationsReservationsListCall
PageSize sets the optional parameter "pageSize": The maximum number of items to return.
func (*ProjectsLocationsReservationsListCall) PageToken ¶
func (c *ProjectsLocationsReservationsListCall) PageToken(pageToken string) *ProjectsLocationsReservationsListCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*ProjectsLocationsReservationsListCall) Pages ¶
func (c *ProjectsLocationsReservationsListCall) Pages(ctx context.Context, f func(*ListReservationsResponse) error) error
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.
type ProjectsLocationsReservationsPatchCall ¶
type ProjectsLocationsReservationsPatchCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsReservationsPatchCall) Context ¶
func (c *ProjectsLocationsReservationsPatchCall) Context(ctx context.Context) *ProjectsLocationsReservationsPatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsReservationsPatchCall) Do ¶
func (c *ProjectsLocationsReservationsPatchCall) Do(opts ...googleapi.CallOption) (*Reservation, error)
Do executes the "bigqueryreservation.projects.locations.reservations.patch" call. Exactly one of *Reservation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Reservation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsReservationsPatchCall) Fields ¶
func (c *ProjectsLocationsReservationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReservationsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsReservationsPatchCall) Header ¶
func (c *ProjectsLocationsReservationsPatchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsReservationsPatchCall) UpdateMask ¶
func (c *ProjectsLocationsReservationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReservationsPatchCall
UpdateMask sets the optional parameter "updateMask": Standard field mask for the set of fields to be updated.
type ProjectsLocationsReservationsService ¶
type ProjectsLocationsReservationsService struct { Assignments *ProjectsLocationsReservationsAssignmentsService // contains filtered or unexported fields }
func NewProjectsLocationsReservationsService ¶
func NewProjectsLocationsReservationsService(s *Service) *ProjectsLocationsReservationsService
func (*ProjectsLocationsReservationsService) Create ¶
func (r *ProjectsLocationsReservationsService) Create(parent string, reservation *Reservation) *ProjectsLocationsReservationsCreateCall
Create: Creates a new reservation resource.
func (*ProjectsLocationsReservationsService) Delete ¶
func (r *ProjectsLocationsReservationsService) Delete(name string) *ProjectsLocationsReservationsDeleteCall
Delete: Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has assignments.
func (*ProjectsLocationsReservationsService) Get ¶
func (r *ProjectsLocationsReservationsService) Get(name string) *ProjectsLocationsReservationsGetCall
Get: Returns information about the reservation.
func (*ProjectsLocationsReservationsService) List ¶
func (r *ProjectsLocationsReservationsService) List(parent string) *ProjectsLocationsReservationsListCall
List: Lists all the reservations for the project in the specified location.
func (*ProjectsLocationsReservationsService) Patch ¶
func (r *ProjectsLocationsReservationsService) Patch(name string, reservation *Reservation) *ProjectsLocationsReservationsPatchCall
Patch: Updates an existing reservation resource.
type ProjectsLocationsSearchAssignmentsCall ¶
type ProjectsLocationsSearchAssignmentsCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsSearchAssignmentsCall) Context ¶
func (c *ProjectsLocationsSearchAssignmentsCall) Context(ctx context.Context) *ProjectsLocationsSearchAssignmentsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsSearchAssignmentsCall) Do ¶
func (c *ProjectsLocationsSearchAssignmentsCall) Do(opts ...googleapi.CallOption) (*SearchAssignmentsResponse, error)
Do executes the "bigqueryreservation.projects.locations.searchAssignments" call. Exactly one of *SearchAssignmentsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SearchAssignmentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsSearchAssignmentsCall) Fields ¶
func (c *ProjectsLocationsSearchAssignmentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchAssignmentsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsSearchAssignmentsCall) Header ¶
func (c *ProjectsLocationsSearchAssignmentsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsSearchAssignmentsCall) IfNoneMatch ¶
func (c *ProjectsLocationsSearchAssignmentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsSearchAssignmentsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsSearchAssignmentsCall) PageSize ¶
func (c *ProjectsLocationsSearchAssignmentsCall) PageSize(pageSize int64) *ProjectsLocationsSearchAssignmentsCall
PageSize sets the optional parameter "pageSize": The maximum number of items to return.
func (*ProjectsLocationsSearchAssignmentsCall) PageToken ¶
func (c *ProjectsLocationsSearchAssignmentsCall) PageToken(pageToken string) *ProjectsLocationsSearchAssignmentsCall
PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous List request, if any.
func (*ProjectsLocationsSearchAssignmentsCall) Pages ¶
func (c *ProjectsLocationsSearchAssignmentsCall) Pages(ctx context.Context, f func(*SearchAssignmentsResponse) error) error
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 (*ProjectsLocationsSearchAssignmentsCall) Query ¶
func (c *ProjectsLocationsSearchAssignmentsCall) Query(query string) *ProjectsLocationsSearchAssignmentsCall
Query sets the optional parameter "query": Please specify resource name as assignee in the query. e.g., "assignee=projects/myproject"
"assignee=folders/123" "assignee=organizations/456"
type ProjectsLocationsService ¶
type ProjectsLocationsService struct { CapacityCommitments *ProjectsLocationsCapacityCommitmentsService Reservations *ProjectsLocationsReservationsService // contains filtered or unexported fields }
func NewProjectsLocationsService ¶
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
func (*ProjectsLocationsService) Get ¶
func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall
Get: Gets information about a location.
func (*ProjectsLocationsService) GetBiReservation ¶ added in v0.14.0
func (r *ProjectsLocationsService) GetBiReservation(name string) *ProjectsLocationsGetBiReservationCall
GetBiReservation: Retrieves a BI reservation.
func (*ProjectsLocationsService) List ¶
func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall
List: Lists information about the supported locations for this service.
func (*ProjectsLocationsService) SearchAssignments ¶
func (r *ProjectsLocationsService) SearchAssignments(parent string) *ProjectsLocationsSearchAssignmentsCall
SearchAssignments: Looks up assignments for a specified resource for a particular region. If the request is about a project:
- Assignments created on the project will be returned if they
exist.
- Otherwise assignments created on the closest ancestor will be returned. 3) Assignments for different JobTypes will all be
returned. Same logic applies if the request is about a folder. If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors). Comparing to ListAssignments, there are some behavior differences:
- permission on the assignee will be verified in this API.
- Hierarchy lookup (project->folder->organization) happens in this
API.
- Parent here is projects/*/locations/*, instead of projects/*/locations/*reservations/*.
Note "-" cannot be used for projects nor locations.
func (*ProjectsLocationsService) UpdateBiReservation ¶ added in v0.14.0
func (r *ProjectsLocationsService) UpdateBiReservation(name string, bireservation *BiReservation) *ProjectsLocationsUpdateBiReservationCall
UpdateBiReservation: Updates a BI reservation. Only fields specified in the field_mask are updated. Singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.
type ProjectsLocationsUpdateBiReservationCall ¶ added in v0.14.0
type ProjectsLocationsUpdateBiReservationCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsUpdateBiReservationCall) Context ¶ added in v0.14.0
func (c *ProjectsLocationsUpdateBiReservationCall) Context(ctx context.Context) *ProjectsLocationsUpdateBiReservationCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsUpdateBiReservationCall) Do ¶ added in v0.14.0
func (c *ProjectsLocationsUpdateBiReservationCall) Do(opts ...googleapi.CallOption) (*BiReservation, error)
Do executes the "bigqueryreservation.projects.locations.updateBiReservation" call. Exactly one of *BiReservation or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BiReservation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsUpdateBiReservationCall) Fields ¶ added in v0.14.0
func (c *ProjectsLocationsUpdateBiReservationCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateBiReservationCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsUpdateBiReservationCall) Header ¶ added in v0.14.0
func (c *ProjectsLocationsUpdateBiReservationCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsUpdateBiReservationCall) UpdateMask ¶ added in v0.14.0
func (c *ProjectsLocationsUpdateBiReservationCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateBiReservationCall
UpdateMask sets the optional parameter "updateMask": A list of fields to be updated in this request.
type ProjectsService ¶
type ProjectsService struct { Locations *ProjectsLocationsService // contains filtered or unexported fields }
func NewProjectsService ¶
func NewProjectsService(s *Service) *ProjectsService
type Reservation ¶
type Reservation struct { // IgnoreIdleSlots: If false, any query using this reservation will use // idle slots from other // reservations within the same admin project. If true, a query using // this // reservation will execute with the maximum slot capacity as specified // above. IgnoreIdleSlots bool `json:"ignoreIdleSlots,omitempty"` // Name: The resource name of the reservation, // e.g., // "projects/*/locations/*/reservations/team1-prod". Name string `json:"name,omitempty"` // SlotCapacity: Maximum slots available to this reservation. 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`. SlotCapacity int64 `json:"slotCapacity,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "IgnoreIdleSlots") 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. "IgnoreIdleSlots") 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 to users.
func (*Reservation) MarshalJSON ¶
func (s *Reservation) MarshalJSON() ([]byte, error)
type SearchAssignmentsResponse ¶
type SearchAssignmentsResponse struct { // Assignments: List of assignments visible to the user. Assignments []*Assignment `json:"assignments,omitempty"` // NextPageToken: Token to retrieve the next page of results, or empty // if there are no // more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Assignments") 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. "Assignments") 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:"-"` }
SearchAssignmentsResponse: The response for ReservationService.SearchAssignments.
func (*SearchAssignmentsResponse) MarshalJSON ¶
func (s *SearchAssignmentsResponse) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Projects *ProjectsService // contains filtered or unexported fields }
func New
deprecated
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.
func NewService ¶
NewService creates a new Service.
type Status ¶
type Status struct { // Code: The status code, which should be an enum value of // google.rpc.Code. Code int64 `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. Message string `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 is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).