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
Implements
Inherited Members
Namespace: Google.Apis.BigQueryReservation.v1beta1
Assembly: Google.Apis.BigQueryReservation.v1beta1.dll
Syntax
public class 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 |
---|---|---|
Google.Apis.Services.IClientService | service | |
Assignment | body | |
System.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 |
---|---|
System.String |
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
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 |
---|---|
System.String |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
System.Object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()