Reservation

class Reservation : KotlinCustomResource

A reservation is a mechanism used to guarantee BigQuery slots to users. To get more information about Reservation, see:

Example Usage

Bigquery Reservation Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const reservation = new gcp.bigquery.Reservation("reservation", {
name: "my-reservation",
location: "us-west2",
slotCapacity: 0,
edition: "STANDARD",
ignoreIdleSlots: true,
concurrency: 0,
autoscale: {
maxSlots: 100,
},
});
import pulumi
import pulumi_gcp as gcp
reservation = gcp.bigquery.Reservation("reservation",
name="my-reservation",
location="us-west2",
slot_capacity=0,
edition="STANDARD",
ignore_idle_slots=True,
concurrency=0,
autoscale={
"max_slots": 100,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var reservation = new Gcp.BigQuery.Reservation("reservation", new()
{
Name = "my-reservation",
Location = "us-west2",
SlotCapacity = 0,
Edition = "STANDARD",
IgnoreIdleSlots = true,
Concurrency = 0,
Autoscale = new Gcp.BigQuery.Inputs.ReservationAutoscaleArgs
{
MaxSlots = 100,
},
});
});
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 {
_, err := bigquery.NewReservation(ctx, "reservation", &bigquery.ReservationArgs{
Name: pulumi.String("my-reservation"),
Location: pulumi.String("us-west2"),
SlotCapacity: pulumi.Int(0),
Edition: pulumi.String("STANDARD"),
IgnoreIdleSlots: pulumi.Bool(true),
Concurrency: pulumi.Int(0),
Autoscale: &bigquery.ReservationAutoscaleArgs{
MaxSlots: pulumi.Int(100),
},
})
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.inputs.ReservationAutoscaleArgs;
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 reservation = new Reservation("reservation", ReservationArgs.builder()
.name("my-reservation")
.location("us-west2")
.slotCapacity(0)
.edition("STANDARD")
.ignoreIdleSlots(true)
.concurrency(0)
.autoscale(ReservationAutoscaleArgs.builder()
.maxSlots(100)
.build())
.build());
}
}
resources:
reservation:
type: gcp:bigquery:Reservation
properties:
name: my-reservation
location: us-west2
slotCapacity: 0
edition: STANDARD
ignoreIdleSlots: true
concurrency: 0
autoscale:
maxSlots: 100

Import

Reservation can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/reservations/{{name}}

  • {{project}}/{{location}}/{{name}}

  • {{location}}/{{name}} When using the pulumi import command, Reservation can be imported using one of the formats above. For example:

$ pulumi import gcp:bigquery/reservation:Reservation default projects/{{project}}/locations/{{location}}/reservations/{{name}}
$ pulumi import gcp:bigquery/reservation:Reservation default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:bigquery/reservation:Reservation default {{location}}/{{name}}

Properties

Link copied to clipboard

The configuration parameters for the auto scaling feature. Structure is documented below.

Link copied to clipboard
val concurrency: Output<Int>?

Maximum number of queries that are allowed to run concurrently in this reservation. This is a soft limit due to asynchronous nature of the system and various optimizations for small queries. Default value is 0 which means that concurrency will be automatically set based on the reservation size.

Link copied to clipboard
val edition: Output<String>

The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ignoreIdleSlots: Output<Boolean>?

If false, any query using this reservation will use idle slots from other reservations within the same admin project. If true, a query using this reservation will execute with the slot capacity specified above at most.

Link copied to clipboard
val location: Output<String>?

The geographic location where the transfer config should reside. Examples: US, EU, asia-northeast1. The default value is US.

Link copied to clipboard

(Optional, Deprecated) Applicable only for reservations located within one of the BigQuery multi-regions (US or EU). If set to true, this reservation is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this reservation is placed in the organization's default region.

Link copied to clipboard
val name: Output<String>

The name of the reservation. This field must only contain alphanumeric characters or dash.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val slotCapacity: Output<Int>

Minimum slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignoreIdleSlots is set to false.

Link copied to clipboard
val urn: Output<String>