1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. bigquery
  5. ReservationAssignment
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.bigquery.ReservationAssignment

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    The BigqueryReservation Assignment resource

    Example Usage

    Basic

    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()
        {
            Project = "my-project-name",
            Location = "us-central1",
            SlotCapacity = 0,
            IgnoreIdleSlots = false,
        });
    
        var primary = new Gcp.BigQuery.ReservationAssignment("primary", new()
        {
            Assignee = "projects/my-project-name",
            JobType = "PIPELINE",
            Reservation = basic.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/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{
    			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, "primary", &bigquery.ReservationAssignmentArgs{
    			Assignee:    pulumi.String("projects/my-project-name"),
    			JobType:     pulumi.String("PIPELINE"),
    			Reservation: basic.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.List;
    import java.util.ArrayList;
    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()        
                .project("my-project-name")
                .location("us-central1")
                .slotCapacity(0)
                .ignoreIdleSlots(false)
                .build());
    
            var primary = new ReservationAssignment("primary", ReservationAssignmentArgs.builder()        
                .assignee("projects/my-project-name")
                .jobType("PIPELINE")
                .reservation(basic.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    basic = gcp.bigquery.Reservation("basic",
        project="my-project-name",
        location="us-central1",
        slot_capacity=0,
        ignore_idle_slots=False)
    primary = gcp.bigquery.ReservationAssignment("primary",
        assignee="projects/my-project-name",
        job_type="PIPELINE",
        reservation=basic.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const basic = new gcp.bigquery.Reservation("basic", {
        project: "my-project-name",
        location: "us-central1",
        slotCapacity: 0,
        ignoreIdleSlots: false,
    });
    const primary = new gcp.bigquery.ReservationAssignment("primary", {
        assignee: "projects/my-project-name",
        jobType: "PIPELINE",
        reservation: basic.id,
    });
    
    resources:
      basic:
        type: gcp:bigquery:Reservation
        properties:
          project: my-project-name
          location: us-central1
          slotCapacity: 0
          ignoreIdleSlots: false
      primary:
        type: gcp:bigquery:ReservationAssignment
        properties:
          assignee: projects/my-project-name
          jobType: PIPELINE
          reservation: ${basic.id}
    

    Create ReservationAssignment Resource

    new ReservationAssignment(name: string, args: ReservationAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def ReservationAssignment(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              assignee: Optional[str] = None,
                              job_type: Optional[str] = None,
                              location: Optional[str] = None,
                              project: Optional[str] = None,
                              reservation: Optional[str] = None)
    @overload
    def ReservationAssignment(resource_name: str,
                              args: ReservationAssignmentArgs,
                              opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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.

    JobType string

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    Reservation string

    The reservation for the resource


    Location string

    The location for the resource

    Project string

    The project for the resource

    Assignee string

    The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.

    JobType string

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    Reservation string

    The reservation for the resource


    Location string

    The location for the resource

    Project string

    The project for the resource

    assignee String

    The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.

    jobType String

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    reservation String

    The reservation for the resource


    location String

    The location for the resource

    project String

    The project for the resource

    assignee string

    The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.

    jobType string

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    reservation string

    The reservation for the resource


    location string

    The location for the resource

    project string

    The project for the resource

    assignee str

    The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.

    job_type str

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    reservation str

    The reservation for the resource


    location str

    The location for the resource

    project str

    The project for the resource

    assignee String

    The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.

    jobType String

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    reservation String

    The reservation for the resource


    location String

    The location for the resource

    project String

    The project for the resource

    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 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,
            job_type: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            reservation: Optional[str] = None,
            state: Optional[str] = None) -> ReservationAssignment
    func 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Assignee string

    The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.

    JobType string

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    Location string

    The location for the resource

    Name string

    Output only. The resource name of the assignment.

    Project string

    The project for the resource

    Reservation string

    The reservation for the resource


    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.

    JobType string

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    Location string

    The location for the resource

    Name string

    Output only. The resource name of the assignment.

    Project string

    The project for the resource

    Reservation string

    The reservation for the resource


    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.

    jobType String

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    location String

    The location for the resource

    name String

    Output only. The resource name of the assignment.

    project String

    The project for the resource

    reservation String

    The reservation for the resource


    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.

    jobType string

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    location string

    The location for the resource

    name string

    Output only. The resource name of the assignment.

    project string

    The project for the resource

    reservation string

    The reservation for the resource


    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.

    job_type str

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    location str

    The location for the resource

    name str

    Output only. The resource name of the assignment.

    project str

    The project for the resource

    reservation str

    The reservation for the resource


    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.

    jobType String

    Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY

    location String

    The location for the resource

    name String

    Output only. The resource name of the assignment.

    project String

    The project for the resource

    reservation String

    The reservation for the resource


    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

    Import

    Assignment can be imported using any of these accepted formats* projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}} * {{project}}/{{location}}/{{reservation}}/{{name}} * {{location}}/{{reservation}}/{{name}} In Terraform v1.5.0 and later, use an import block to import Assignment using one of the formats above. For exampletf import {

    id = “projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}”

    to = google_bigquery_reservation_assignment.default }

     $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Assignment 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}}
    

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi