Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource

The "assignments" collection of methods.

Inheritance
object
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.BigQueryReservation.v1
Assembly: Google.Apis.BigQueryReservation.v1.dll
Syntax
public class ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource

Constructors

AssignmentsResource(IClientService)

Constructs a new resource.

Declaration
public AssignmentsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(Assignment, string)

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. "None" assignments represent an absence of the assignment. Projects assigned to None use on-demand pricing. To create a "None" assignment, use "none" as a reservation_id in the parent. Example parent: projects/myproject/locations/US/reservations/none. 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.

Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.CreateRequest Create(Assignment body, string parent)
Parameters
Type Name Description
Assignment body

The body of the request.

string parent

Required. The parent resource name of the assignment E.g. projects/myproject/locations/US/reservations/team1-prod

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.CreateRequest

Delete(string)

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.
Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. Name of the resource, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.DeleteRequest

GetIamPolicy(string)

Gets the access control policy for a resource. May return: * ANOT_FOUND error if the resource doesn't exist or you don't have the permission to view it. * An empty policy if the resource exists but doesn't have a set policy. Supported resources are: - Reservations - ReservationAssignments To call this method, you must have the following Google IAM permissions:

  • bigqueryreservation.reservations.getIamPolicy to get policies on reservations.
Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.GetIamPolicyRequest GetIamPolicy(string resource)
Parameters
Type Name Description
string resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.GetIamPolicyRequest

List(string)

Lists assignments. Only explicitly created assignments will be returned. 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.

Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.ListRequest List(string parent)
Parameters
Type Name Description
string parent

Required. The parent resource name e.g.: projects/myproject/locations/US/reservations/team1-prod Or: projects/myproject/locations/US/reservations/-

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.ListRequest

Move(MoveAssignmentRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.MoveRequest Move(MoveAssignmentRequest body, string name)
Parameters
Type Name Description
MoveAssignmentRequest body

The body of the request.

string name

Required. The resource name of the assignment, e.g. projects/myproject/locations/US/reservations/team1-prod/assignments/123

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.MoveRequest

Patch(Assignment, string)

Updates an existing assignment. Only the priority field can be updated.

Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.PatchRequest Patch(Assignment body, string name)
Parameters
Type Name Description
Assignment body

The body of the request.

string name

Output only. Name of the resource. E.g.: projects/myproject/locations/US/reservations/team1-prod/assignments/123. The assignment_id must only contain lower case alphanumeric characters or dashes and the max length is 64 characters.

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.PatchRequest

SetIamPolicy(SetIamPolicyRequest, string)

Sets an access control policy for a resource. Replaces any existing policy. Supported resources are: - Reservations To call this method, you must have the following Google IAM permissions: - bigqueryreservation.reservations.setIamPolicy to set policies on reservations.

Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type Name Description
SetIamPolicyRequest body

The body of the request.

string resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.SetIamPolicyRequest

TestIamPermissions(TestIamPermissionsRequest, string)

Gets your permissions on a resource. Returns an empty set of permissions if the resource doesn't exist. Supported resources are: - Reservations No Google IAM permissions are required to call this method.

Declaration
public virtual ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type Name Description
TestIamPermissionsRequest body

The body of the request.

string resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.TestIamPermissionsRequest
In this article
Back to top Generated by DocFX