Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.CreateRequest

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.

Inheritance
object
ClientServiceRequest
ClientServiceRequest<Assignment>
BigQueryReservationBaseServiceRequest<Assignment>
ProjectsResource.LocationsResource.ReservationsResource.AssignmentsResource.CreateRequest
Implements
IClientServiceRequest<Assignment>
IClientServiceRequest
Inherited Members
BigQueryReservationBaseServiceRequest<Assignment>.Xgafv
BigQueryReservationBaseServiceRequest<Assignment>.AccessToken
BigQueryReservationBaseServiceRequest<Assignment>.Alt
BigQueryReservationBaseServiceRequest<Assignment>.Callback
BigQueryReservationBaseServiceRequest<Assignment>.Fields
BigQueryReservationBaseServiceRequest<Assignment>.Key
BigQueryReservationBaseServiceRequest<Assignment>.OauthToken
BigQueryReservationBaseServiceRequest<Assignment>.PrettyPrint
BigQueryReservationBaseServiceRequest<Assignment>.QuotaUser
BigQueryReservationBaseServiceRequest<Assignment>.UploadType
BigQueryReservationBaseServiceRequest<Assignment>.UploadProtocol
ClientServiceRequest<Assignment>.Execute()
ClientServiceRequest<Assignment>.ExecuteAsStream()
ClientServiceRequest<Assignment>.ExecuteAsync()
ClientServiceRequest<Assignment>.ExecuteAsync(CancellationToken)
ClientServiceRequest<Assignment>.ExecuteAsStreamAsync()
ClientServiceRequest<Assignment>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<Assignment>.CreateRequest(bool?)
ClientServiceRequest<Assignment>.GenerateRequestUri()
ClientServiceRequest<Assignment>.GetDefaultETagAction(string)
ClientServiceRequest<Assignment>.ETagAction
ClientServiceRequest<Assignment>.ModifyRequest
ClientServiceRequest<Assignment>.ValidateParameters
ClientServiceRequest<Assignment>.ApiVersion
ClientServiceRequest<Assignment>.RequestParameters
ClientServiceRequest<Assignment>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
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.CreateRequest : BigQueryReservationBaseServiceRequest<Assignment>, IClientServiceRequest<Assignment>, IClientServiceRequest

Constructors

CreateRequest(IClientService, Assignment, string)

Constructs a new Create request.

Declaration
public CreateRequest(IClientService service, Assignment body, string parent)
Parameters
Type Name Description
IClientService service
Assignment body
string parent

Properties

AssignmentId

The optional assignment ID. Assignment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. Max length is 64 characters.

Declaration
[RequestParameter("assignmentId", RequestParameterType.Query)]
public virtual string AssignmentId { get; set; }
Property Value
Type Description
string

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Assignment>.HttpMethod

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Assignment>.MethodName

Parent

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

Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type Description
string

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<Assignment>.RestPath

Methods

GetBody()

Returns the body of the request.

Declaration
protected override object GetBody()
Returns
Type Description
object
Overrides
ClientServiceRequest<Assignment>.GetBody()

InitParameters()

Initializes Create parameter list.

Declaration
protected override void InitParameters()
Overrides
BigQueryReservationBaseServiceRequest<Assignment>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
In this article
Back to top Generated by DocFX