RegionCommitmentArgs

data class RegionCommitmentArgs(val autoRenew: Output<Boolean>? = null, val category: Output<String>? = null, val description: Output<String>? = null, val licenseResource: Output<RegionCommitmentLicenseResourceArgs>? = null, val name: Output<String>? = null, val plan: Output<String>? = null, val project: Output<String>? = null, val region: Output<String>? = null, val resources: Output<List<RegionCommitmentResourceArgs>>? = null, val type: Output<String>? = null) : ConvertibleToJava<RegionCommitmentArgs>

Represents a regional Commitment resource. Creating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. To get more information about RegionCommitment, see:

Example Usage

Compute Region Commitment Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionCommitment;
import com.pulumi.gcp.compute.RegionCommitmentArgs;
import com.pulumi.gcp.compute.inputs.RegionCommitmentResourceArgs;
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 foobar = new RegionCommitment("foobar", RegionCommitmentArgs.builder()
.plan("THIRTY_SIX_MONTH")
.resources(
RegionCommitmentResourceArgs.builder()
.amount("4")
.type("VCPU")
.build(),
RegionCommitmentResourceArgs.builder()
.amount("9")
.type("MEMORY")
.build())
.build());
}
}

Compute Region Commitment Full

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionCommitment;
import com.pulumi.gcp.compute.RegionCommitmentArgs;
import com.pulumi.gcp.compute.inputs.RegionCommitmentResourceArgs;
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 foobar = new RegionCommitment("foobar", RegionCommitmentArgs.builder()
.autoRenew(true)
.category("MACHINE")
.description("some description")
.plan("THIRTY_SIX_MONTH")
.resources(
RegionCommitmentResourceArgs.builder()
.amount("4")
.type("VCPU")
.build(),
RegionCommitmentResourceArgs.builder()
.amount("9")
.type("MEMORY")
.build())
.type("MEMORY_OPTIMIZED")
.build());
}
}

Import

RegionCommitment can be imported using any of these accepted formats

$ pulumi import gcp:compute/regionCommitment:RegionCommitment default projects/{{project}}/regions/{{region}}/commitments/{{name}}
$ pulumi import gcp:compute/regionCommitment:RegionCommitment default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionCommitment:RegionCommitment default {{region}}/{{name}}
$ pulumi import gcp:compute/regionCommitment:RegionCommitment default {{name}}

Constructors

Link copied to clipboard
constructor(autoRenew: Output<Boolean>? = null, category: Output<String>? = null, description: Output<String>? = null, licenseResource: Output<RegionCommitmentLicenseResourceArgs>? = null, name: Output<String>? = null, plan: Output<String>? = null, project: Output<String>? = null, region: Output<String>? = null, resources: Output<List<RegionCommitmentResourceArgs>>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val autoRenew: Output<Boolean>? = null

Specifies whether to enable automatic renewal for the commitment. The default value is false if not specified. If the field is set to true, the commitment will be automatically renewed for either one or three years according to the terms of the existing commitment.

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

The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified. Possible values are: LICENSE, MACHINE.

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

An optional description of this resource.

Link copied to clipboard

The license specification required as part of a license commitment. Structure is documented below.

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

Name of the resource. The name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

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

The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years). Possible values are: TWELVE_MONTH, THIRTY_SIX_MONTH.

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

URL of the region where this commitment may be used.

Link copied to clipboard

A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.

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

The type of commitment, which affects the discount rate and the eligible resources. The type could be one of the following value: MEMORY_OPTIMIZED, ACCELERATOR_OPTIMIZED, GENERAL_PURPOSE_N1, GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D, GENERAL_PURPOSE_E2, GENERAL_PURPOSE_T2D, GENERAL_PURPOSE_C3, COMPUTE_OPTIMIZED_C2, COMPUTE_OPTIMIZED_C2D and GRAPHICS_OPTIMIZED_G2

Functions

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