@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
232 lines (231 loc) • 10.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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:
*
* * [API documentation](https://cloud.google.com/bigquery/docs/reference/reservations/rest/v1/projects.locations.capacityCommitments)
* * How-to Guides
* * [Introduction to Reservations](https://cloud.google.com/bigquery/docs/reservations-intro)
*
* ## Example Usage
*
* ### Bigquery Reservation Capacity Commitment Docs
*
* ```typescript
* 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
*
* 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:
*
* ```sh
* $ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}
* ```
*
* ```sh
* $ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default {{project}}/{{location}}/{{capacity_commitment_id}}
* ```
*
* ```sh
* $ pulumi import gcp:bigquery/capacityCommitment:CapacityCommitment default {{location}}/{{capacity_commitment_id}}
* ```
*/
export declare class CapacityCommitment extends pulumi.CustomResource {
/**
* Get an existing CapacityCommitment resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CapacityCommitmentState, opts?: pulumi.CustomResourceOptions): CapacityCommitment;
/**
* Returns true if the given object is an instance of CapacityCommitment. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is CapacityCommitment;
/**
* 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.
*/
readonly capacityCommitmentId: pulumi.Output<string | undefined>;
/**
* The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
*/
readonly commitmentEndTime: pulumi.Output<string>;
/**
* The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
*/
readonly commitmentStartTime: pulumi.Output<string>;
/**
* The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
*/
readonly edition: pulumi.Output<string | undefined>;
/**
* If true, fail the request if another project in the organization has a capacity commitment.
*/
readonly enforceSingleAdminProjectPerOrg: pulumi.Output<string | undefined>;
/**
* The geographic location where the transfer config should reside.
* Examples: US, EU, asia-northeast1. The default value is US.
*/
readonly location: pulumi.Output<string | undefined>;
/**
* The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
*/
readonly name: pulumi.Output<string>;
/**
* Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
*/
readonly plan: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* 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.
*/
readonly renewalPlan: pulumi.Output<string | undefined>;
/**
* Number of slots in this commitment.
*/
readonly slotCount: pulumi.Output<number>;
/**
* State of the commitment
*/
readonly state: pulumi.Output<string>;
/**
* Create a CapacityCommitment resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: CapacityCommitmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CapacityCommitment resources.
*/
export interface CapacityCommitmentState {
/**
* 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.
*/
capacityCommitmentId?: pulumi.Input<string>;
/**
* The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
*/
commitmentEndTime?: pulumi.Input<string>;
/**
* The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
*/
commitmentStartTime?: pulumi.Input<string>;
/**
* The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
*/
edition?: pulumi.Input<string>;
/**
* If true, fail the request if another project in the organization has a capacity commitment.
*/
enforceSingleAdminProjectPerOrg?: pulumi.Input<string>;
/**
* The geographic location where the transfer config should reside.
* Examples: US, EU, asia-northeast1. The default value is US.
*/
location?: pulumi.Input<string>;
/**
* The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123
*/
name?: pulumi.Input<string>;
/**
* Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
*/
plan?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* 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.
*/
renewalPlan?: pulumi.Input<string>;
/**
* Number of slots in this commitment.
*/
slotCount?: pulumi.Input<number>;
/**
* State of the commitment
*/
state?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a CapacityCommitment resource.
*/
export interface CapacityCommitmentArgs {
/**
* 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.
*/
capacityCommitmentId?: pulumi.Input<string>;
/**
* The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
*/
edition?: pulumi.Input<string>;
/**
* If true, fail the request if another project in the organization has a capacity commitment.
*/
enforceSingleAdminProjectPerOrg?: pulumi.Input<string>;
/**
* The geographic location where the transfer config should reside.
* Examples: US, EU, asia-northeast1. The default value is US.
*/
location?: pulumi.Input<string>;
/**
* Capacity commitment plan. Valid values are at https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1#commitmentplan
*/
plan: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* 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.
*/
renewalPlan?: pulumi.Input<string>;
/**
* Number of slots in this commitment.
*/
slotCount: pulumi.Input<number>;
}