Google_Service_BigQueryReservation_Resource_ProjectsLocationsReservationsAssignments
extends Google_Service_Resource
in package
The "assignments" collection of methods.
Typical usage is:
$bigqueryreservationService = new Google_Service_BigQueryReservation(...);
$assignments = $bigqueryreservationService->assignments;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- create() : Google_Service_BigQueryReservation_Assignment
- Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation. Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type. Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query. When creating assignments, it does not matter if other assignments exist at higher levels. Example: * The organization `organizationA` contains two projects, `project1` and `project2`. * Assignments for all three entities (`organizationA`, `project1`, and `project2`) could all be created and mapped to the same or different reservations. 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.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_BigQueryReservation_BigqueryreservationEmpty
- Deletes a assignment. No expansion will happen. Example: * Organization `organizationA` contains two projects, `project1` and `project2`. * Reservation `res1` exists and was created previously. * CreateAssignment was used previously to define the following associations between entities and reservations: `` and `` In this example, deletion of the `` assignment won't affect the other assignment ``. After said deletion, queries from `project1` will still use `res1` while queries from `project2` will switch to use on- demand mode. (assignments.delete)
- listProjectsLocationsReservationsAssignments() : Google_Service_BigQueryReservation_ListAssignmentsResponse
- Lists assignments. Only explicitly created assignments will be returned.
- move() : Google_Service_BigQueryReservation_Assignment
- Moves an assignment under a new reservation. This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —create()
Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation. Currently a resource (project, folder, organization) can only have one assignment per each (job_type, location) combination, and that reservation will be used for all jobs of the matching type. Different assignments can be created on different levels of the projects, folders or organization hierarchy. During query execution, the assignment is looked up at the project, folder and organization levels in that order. The first assignment found is applied to the query. When creating assignments, it does not matter if other assignments exist at higher levels. Example: * The organization `organizationA` contains two projects, `project1` and `project2`. * Assignments for all three entities (`organizationA`, `project1`, and `project2`) could all be created and mapped to the same or different reservations. 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.
public
create(string $parent, Google_Service_BigQueryReservation_Assignment $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_Assignment
(assignments.create)
Parameters
- $parent : string
-
Required. The parent resource name of the assignment E.g.
projects/myproject/locations/US/reservations/team1-prod - $postBody : Google_Service_BigQueryReservation_Assignment
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_Assignment —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
delete()
Deletes a assignment. No expansion will happen. Example: * Organization `organizationA` contains two projects, `project1` and `project2`. * Reservation `res1` exists and was created previously. * CreateAssignment was used previously to define the following associations between entities and reservations: `` and `` In this example, deletion of the `` assignment won't affect the other assignment ``. After said deletion, queries from `project1` will still use `res1` while queries from `project2` will switch to use on- demand mode. (assignments.delete)
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_BigqueryreservationEmpty
Parameters
- $name : string
-
Required. Name of the resource, e.g.
projects/myproject/locations/US/reservations/team1-prod/assignments/123 - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_BigqueryreservationEmpty —listProjectsLocationsReservationsAssignments()
Lists assignments. Only explicitly created assignments will be returned.
public
listProjectsLocationsReservationsAssignments(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_ListAssignmentsResponse
Example: * Organization organizationA contains two projects, project1 and
project2. * Reservation res1 exists and was created previously. *
CreateAssignment was used previously to define the following associations
between entities and reservations: and In this example, ListAssignments
will just return the above two assignments for reservation res1, and no
expansion/merge will happen. The 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. (assignments.listProjectsLocationsReservationsAssignments)
Parameters
- $parent : string
-
Required. The parent resource name e.g.:
projects/myproject/locations/US/reservations/team1-prodOr:projects/myproject/locations/US/reservations/- - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_BigQueryReservation_ListAssignmentsResponse —move()
Moves an assignment under a new reservation. This differs from removing an existing assignment and recreating a new one by providing a transactional change that ensures an assignee always has an associated reservation.
public
move(string $name, Google_Service_BigQueryReservation_MoveAssignmentRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_BigQueryReservation_Assignment
(assignments.move)
Parameters
- $name : string
-
Required. The resource name of the assignment, e.g.
projects/myproject/locations/US/reservations/team1-prod/assignments/123 - $postBody : Google_Service_BigQueryReservation_MoveAssignmentRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_BigQueryReservation_Assignment —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed