CapacityCommitmentArgs

data class CapacityCommitmentArgs(val capacityCommitmentId: Output<String>? = null, val edition: Output<String>? = null, val enforceSingleAdminProjectPerOrg: Output<String>? = null, val location: Output<String>? = null, val plan: Output<String>? = null, val project: Output<String>? = null, val renewalPlan: Output<String>? = null, val slotCount: Output<Int>? = null) : ConvertibleToJava<CapacityCommitmentArgs>

Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes. In order to remove annual commitment, its plan needs to be changed to monthly or flex first. To get more information about CapacityCommitment, see:

Example Usage

Bigquery Reservation Capacity Commitment Docs

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.bigquery.CapacityCommitment("example", {
capacityCommitmentId: "example-commitment",
location: "us-west2",
slotCount: 100,
plan: "FLEX_FLAT_RATE",
edition: "ENTERPRISE",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.bigquery.CapacityCommitment("example",
capacity_commitment_id="example-commitment",
location="us-west2",
slot_count=100,
plan="FLEX_FLAT_RATE",
edition="ENTERPRISE")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.BigQuery.CapacityCommitment("example", new()
{
CapacityCommitmentId = "example-commitment",
Location = "us-west2",
SlotCount = 100,
Plan = "FLEX_FLAT_RATE",
Edition = "ENTERPRISE",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/bigquery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigquery.NewCapacityCommitment(ctx, "example", &bigquery.CapacityCommitmentArgs{
CapacityCommitmentId: pulumi.String("example-commitment"),
Location: pulumi.String("us-west2"),
SlotCount: pulumi.Int(100),
Plan: pulumi.String("FLEX_FLAT_RATE"),
Edition: pulumi.String("ENTERPRISE"),
})
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.CapacityCommitment;
import com.pulumi.gcp.bigquery.CapacityCommitmentArgs;
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 example = new CapacityCommitment("example", CapacityCommitmentArgs.builder()
.capacityCommitmentId("example-commitment")
.location("us-west2")
.slotCount(100)
.plan("FLEX_FLAT_RATE")
.edition("ENTERPRISE")
.build());
}
}
resources:
example:
type: gcp:bigquery:CapacityCommitment
properties:
capacityCommitmentId: example-commitment
location: us-west2
slotCount: 100
plan: FLEX_FLAT_RATE
edition: ENTERPRISE

Import

CapacityCommitment can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}

  • {{project}}/{{location}}/{{capacity_commitment_id}}

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

$ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}
$ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default {{project}}/{{location}}/{{capacity_commitment_id}}
$ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default {{location}}/{{capacity_commitment_id}}

Constructors

Link copied to clipboard
constructor(capacityCommitmentId: Output<String>? = null, edition: Output<String>? = null, enforceSingleAdminProjectPerOrg: Output<String>? = null, location: Output<String>? = null, plan: Output<String>? = null, project: Output<String>? = null, renewalPlan: Output<String>? = null, slotCount: Output<Int>? = null)

Properties

Link copied to clipboard
val capacityCommitmentId: Output<String>? = null

The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged.

Link copied to clipboard
val edition: Output<String>? = null

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

Link copied to clipboard

If true, fail the request if another project in the organization has a capacity commitment.

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

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

Link copied to clipboard
val plan: Output<String>? = null

Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan

Link copied to clipboard
val project: Output<String>? = null

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 renewalPlan: Output<String>? = null

The plan this capacity commitment is converted to after commitmentEndTime passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for some commitment plans.

Link copied to clipboard
val slotCount: Output<Int>? = null

Number of slots in this commitment.

Functions

Link copied to clipboard
open override fun toJava(): CapacityCommitmentArgs