published on Wednesday, Nov 18, 2026 by Pulumi
published on Wednesday, Nov 18, 2026 by Pulumi
The BigqueryReservation Assignment resource.
To get more information about ReservationAssignment, see:
- API documentation
- How-to Guides
Example Usage
Bigquery Reservation Assignment Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basic = new gcp.bigquery.Reservation("basic", {
name: "example-reservation",
project: "my-project-name",
location: "us-central1",
slotCapacity: 0,
ignoreIdleSlots: false,
});
const assignment = new gcp.bigquery.ReservationAssignment("assignment", {
assignee: "projects/my-project-name",
jobType: "PIPELINE",
reservation: basic.id,
});
import pulumi
import pulumi_gcp as gcp
basic = gcp.bigquery.Reservation("basic",
name="example-reservation",
project="my-project-name",
location="us-central1",
slot_capacity=0,
ignore_idle_slots=False)
assignment = gcp.bigquery.ReservationAssignment("assignment",
assignee="projects/my-project-name",
job_type="PIPELINE",
reservation=basic.id)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/bigquery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
basic, err := bigquery.NewReservation(ctx, "basic", &bigquery.ReservationArgs{
Name: pulumi.String("example-reservation"),
Project: pulumi.String("my-project-name"),
Location: pulumi.String("us-central1"),
SlotCapacity: pulumi.Int(0),
IgnoreIdleSlots: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = bigquery.NewReservationAssignment(ctx, "assignment", &bigquery.ReservationAssignmentArgs{
Assignee: pulumi.String("projects/my-project-name"),
JobType: pulumi.String("PIPELINE"),
Reservation: basic.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var basic = new Gcp.BigQuery.Reservation("basic", new()
{
Name = "example-reservation",
Project = "my-project-name",
Location = "us-central1",
SlotCapacity = 0,
IgnoreIdleSlots = false,
});
var assignment = new Gcp.BigQuery.ReservationAssignment("assignment", new()
{
Assignee = "projects/my-project-name",
JobType = "PIPELINE",
Reservation = basic.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigquery.Reservation;
import com.pulumi.gcp.bigquery.ReservationArgs;
import com.pulumi.gcp.bigquery.ReservationAssignment;
import com.pulumi.gcp.bigquery.ReservationAssignmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var basic = new Reservation("basic", ReservationArgs.builder()
.name("example-reservation")
.project("my-project-name")
.location("us-central1")
.slotCapacity(0)
.ignoreIdleSlots(false)
.build());
var assignment = new ReservationAssignment("assignment", ReservationAssignmentArgs.builder()
.assignee("projects/my-project-name")
.jobType("PIPELINE")
.reservation(basic.id())
.build());
}
}
resources:
basic:
type: gcp:bigquery:Reservation
properties:
name: example-reservation
project: my-project-name
location: us-central1
slotCapacity: 0
ignoreIdleSlots: false
assignment:
type: gcp:bigquery:ReservationAssignment
properties:
assignee: projects/my-project-name
jobType: PIPELINE
reservation: ${basic.id}
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigquery_reservation" "basic" {
lifecycle {
create_before_destroy = true
}
name = "example-reservation"
project = "my-project-name"
location = "us-central1"
slot_capacity = 0
ignore_idle_slots = false
}
resource "gcp_bigquery_reservation_assignment" "assignment" {
lifecycle {
create_before_destroy = true
}
assignee = "projects/my-project-name"
job_type = "PIPELINE"
reservation = gcp_bigquery_reservation.basic.id
}
Create ReservationAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ReservationAssignment(name: string, args: ReservationAssignmentArgs, opts?: CustomResourceOptions);@overload
def ReservationAssignment(resource_name: str,
args: ReservationAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ReservationAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
assignee: Optional[str] = None,
reservation: Optional[str] = None,
deletion_policy: Optional[str] = None,
job_type: Optional[str] = None,
location: Optional[str] = None,
principal: Optional[str] = None,
project: Optional[str] = None,
scheduling_policy: Optional[ReservationAssignmentSchedulingPolicyArgs] = None)func NewReservationAssignment(ctx *Context, name string, args ReservationAssignmentArgs, opts ...ResourceOption) (*ReservationAssignment, error)public ReservationAssignment(string name, ReservationAssignmentArgs args, CustomResourceOptions? opts = null)
public ReservationAssignment(String name, ReservationAssignmentArgs args)
public ReservationAssignment(String name, ReservationAssignmentArgs args, CustomResourceOptions options)
type: gcp:bigquery:ReservationAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_bigquery_reservation_assignment" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ReservationAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ReservationAssignmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ReservationAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReservationAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReservationAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var reservationAssignmentResource = new Gcp.BigQuery.ReservationAssignment("reservationAssignmentResource", new()
{
Assignee = "string",
Reservation = "string",
DeletionPolicy = "string",
JobType = "string",
Location = "string",
Principal = "string",
Project = "string",
SchedulingPolicy = new Gcp.BigQuery.Inputs.ReservationAssignmentSchedulingPolicyArgs
{
Concurrency = 0,
MaxSlots = 0,
},
});
example, err := bigquery.NewReservationAssignment(ctx, "reservationAssignmentResource", &bigquery.ReservationAssignmentArgs{
Assignee: pulumi.String("string"),
Reservation: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
JobType: pulumi.String("string"),
Location: pulumi.String("string"),
Principal: pulumi.String("string"),
Project: pulumi.String("string"),
SchedulingPolicy: &bigquery.ReservationAssignmentSchedulingPolicyArgs{
Concurrency: pulumi.Int(0),
MaxSlots: pulumi.Int(0),
},
})
resource "gcp_bigquery_reservation_assignment" "reservationAssignmentResource" {
lifecycle {
create_before_destroy = true
}
assignee = "string"
reservation = "string"
deletion_policy = "string"
job_type = "string"
location = "string"
principal = "string"
project = "string"
scheduling_policy = {
concurrency = 0
max_slots = 0
}
}
var reservationAssignmentResource = new ReservationAssignment("reservationAssignmentResource", ReservationAssignmentArgs.builder()
.assignee("string")
.reservation("string")
.deletionPolicy("string")
.jobType("string")
.location("string")
.principal("string")
.project("string")
.schedulingPolicy(ReservationAssignmentSchedulingPolicyArgs.builder()
.concurrency(0)
.maxSlots(0)
.build())
.build());
reservation_assignment_resource = gcp.bigquery.ReservationAssignment("reservationAssignmentResource",
assignee="string",
reservation="string",
deletion_policy="string",
job_type="string",
location="string",
principal="string",
project="string",
scheduling_policy={
"concurrency": 0,
"max_slots": 0,
})
const reservationAssignmentResource = new gcp.bigquery.ReservationAssignment("reservationAssignmentResource", {
assignee: "string",
reservation: "string",
deletionPolicy: "string",
jobType: "string",
location: "string",
principal: "string",
project: "string",
schedulingPolicy: {
concurrency: 0,
maxSlots: 0,
},
});
type: gcp:bigquery:ReservationAssignment
properties:
assignee: string
deletionPolicy: string
jobType: string
location: string
principal: string
project: string
reservation: string
schedulingPolicy:
concurrency: 0
maxSlots: 0
ReservationAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ReservationAssignment resource accepts the following input properties:
- Assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- Reservation string
- The reservation for the resource
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Job
Type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- Location string
- The location for the resource
- Principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Scheduling
Policy ReservationAssignment Scheduling Policy - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- Assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- Reservation string
- The reservation for the resource
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Job
Type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- Location string
- The location for the resource
- Principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Scheduling
Policy ReservationAssignment Scheduling Policy Args - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- reservation string
- The reservation for the resource
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job_
type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location string
- The location for the resource
- principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- scheduling_
policy object - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- assignee String
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- reservation String
- The reservation for the resource
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job
Type String - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location String
- The location for the resource
- principal String
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- scheduling
Policy ReservationAssignment Scheduling Policy - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- reservation string
- The reservation for the resource
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job
Type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location string
- The location for the resource
- principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- scheduling
Policy ReservationAssignment Scheduling Policy - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- assignee str
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- reservation str
- The reservation for the resource
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job_
type str - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location str
- The location for the resource
- principal str
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- scheduling_
policy ReservationAssignment Scheduling Policy Args - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- assignee String
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- reservation String
- The reservation for the resource
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job
Type String - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location String
- The location for the resource
- principal String
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- scheduling
Policy Property Map - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the ReservationAssignment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Output only. The resource name of the assignment.
- State string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Output only. The resource name of the assignment.
- State string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Output only. The resource name of the assignment.
- state string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Output only. The resource name of the assignment.
- state String
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Output only. The resource name of the assignment.
- state string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Output only. The resource name of the assignment.
- state str
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Output only. The resource name of the assignment.
- state String
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
Look up Existing ReservationAssignment Resource
Get an existing ReservationAssignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ReservationAssignmentState, opts?: CustomResourceOptions): ReservationAssignment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
assignee: Optional[str] = None,
deletion_policy: Optional[str] = None,
job_type: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
principal: Optional[str] = None,
project: Optional[str] = None,
reservation: Optional[str] = None,
scheduling_policy: Optional[ReservationAssignmentSchedulingPolicyArgs] = None,
state: Optional[str] = None) -> ReservationAssignmentfunc GetReservationAssignment(ctx *Context, name string, id IDInput, state *ReservationAssignmentState, opts ...ResourceOption) (*ReservationAssignment, error)public static ReservationAssignment Get(string name, Input<string> id, ReservationAssignmentState? state, CustomResourceOptions? opts = null)public static ReservationAssignment get(String name, Output<String> id, ReservationAssignmentState state, CustomResourceOptions options)resources: existingReservationAssignment: type: gcp:bigquery:ReservationAssignment get: id: ${id}import {
to = gcp_bigquery_reservation_assignment.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state ReservationAssignmentState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state ReservationAssignmentState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state ReservationAssignmentState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state ReservationAssignmentState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Job
Type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- Location string
- The location for the resource
- Name string
- Output only. The resource name of the assignment.
- Principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Reservation string
- The reservation for the resource
- Scheduling
Policy ReservationAssignment Scheduling Policy - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- State string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- Assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Job
Type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- Location string
- The location for the resource
- Name string
- Output only. The resource name of the assignment.
- Principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Reservation string
- The reservation for the resource
- Scheduling
Policy ReservationAssignment Scheduling Policy Args - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- State string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job_
type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location string
- The location for the resource
- name string
- Output only. The resource name of the assignment.
- principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reservation string
- The reservation for the resource
- scheduling_
policy object - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- state string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- assignee String
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job
Type String - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location String
- The location for the resource
- name String
- Output only. The resource name of the assignment.
- principal String
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reservation String
- The reservation for the resource
- scheduling
Policy ReservationAssignment Scheduling Policy - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- state String
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- assignee string
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job
Type string - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location string
- The location for the resource
- name string
- Output only. The resource name of the assignment.
- principal string
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reservation string
- The reservation for the resource
- scheduling
Policy ReservationAssignment Scheduling Policy - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- state string
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- assignee str
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job_
type str - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location str
- The location for the resource
- name str
- Output only. The resource name of the assignment.
- principal str
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reservation str
- The reservation for the resource
- scheduling_
policy ReservationAssignment Scheduling Policy Args - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- state str
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
- assignee String
- The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- job
Type String - Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY, CONTINUOUS
- location String
- The location for the resource
- name String
- Output only. The resource name of the assignment.
- principal String
- Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are:
principal://goog/subject/USER_EMAIL_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknownOrDeletedUserrepresents principals which cannot be read from the user info service, for example deleted users.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reservation String
- The reservation for the resource
- scheduling
Policy Property Map - The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation. Structure is documented below.
- state String
- Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
Supporting Types
ReservationAssignmentSchedulingPolicy, ReservationAssignmentSchedulingPolicyArgs
- Concurrency int
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- Max
Slots int - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
- Concurrency int
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- Max
Slots int - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
- concurrency number
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- max_
slots number - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
- concurrency Integer
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- max
Slots Integer - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
- concurrency number
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- max
Slots number - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
- concurrency int
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- max_
slots int - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
- concurrency Number
- If present and > 0, the reservation will attempt to limit the concurrency of jobs running for any particular project within it to the given value.
- max
Slots Number - If present and > 0, the reservation will attempt to limit the slot consumption of queries running for any particular project within it to the given value.
Import
ReservationAssignment can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}{{project}}/{{location}}/{{reservation}}/{{name}}{{location}}/{{reservation}}/{{name}}
When using the pulumi import command, ReservationAssignment can be imported using one of the formats above. For example:
$ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}
$ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default {{project}}/{{location}}/{{reservation}}/{{name}}
$ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default {{location}}/{{reservation}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Wednesday, Nov 18, 2026 by Pulumi