gcp.compute.RegionCommitment
Explore with Pulumi AI
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var foobar = new Gcp.Compute.RegionCommitment("foobar", new()
{
Plan = "THIRTY_SIX_MONTH",
Resources = new[]
{
new Gcp.Compute.Inputs.RegionCommitmentResourceArgs
{
Amount = "4",
Type = "VCPU",
},
new Gcp.Compute.Inputs.RegionCommitmentResourceArgs
{
Amount = "9",
Type = "MEMORY",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewRegionCommitment(ctx, "foobar", &compute.RegionCommitmentArgs{
Plan: pulumi.String("THIRTY_SIX_MONTH"),
Resources: compute.RegionCommitmentResourceArray{
&compute.RegionCommitmentResourceArgs{
Amount: pulumi.String("4"),
Type: pulumi.String("VCPU"),
},
&compute.RegionCommitmentResourceArgs{
Amount: pulumi.String("9"),
Type: pulumi.String("MEMORY"),
},
},
})
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.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());
}
}
import pulumi
import pulumi_gcp as gcp
foobar = gcp.compute.RegionCommitment("foobar",
plan="THIRTY_SIX_MONTH",
resources=[
gcp.compute.RegionCommitmentResourceArgs(
amount="4",
type="VCPU",
),
gcp.compute.RegionCommitmentResourceArgs(
amount="9",
type="MEMORY",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foobar = new gcp.compute.RegionCommitment("foobar", {
plan: "THIRTY_SIX_MONTH",
resources: [
{
amount: "4",
type: "VCPU",
},
{
amount: "9",
type: "MEMORY",
},
],
});
resources:
foobar:
type: gcp:compute:RegionCommitment
properties:
plan: THIRTY_SIX_MONTH
resources:
- amount: '4'
type: VCPU
- amount: '9'
type: MEMORY
Compute Region Commitment Full
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var foobar = new Gcp.Compute.RegionCommitment("foobar", new()
{
AutoRenew = true,
Category = "MACHINE",
Description = "some description",
Plan = "THIRTY_SIX_MONTH",
Resources = new[]
{
new Gcp.Compute.Inputs.RegionCommitmentResourceArgs
{
Amount = "4",
Type = "VCPU",
},
new Gcp.Compute.Inputs.RegionCommitmentResourceArgs
{
Amount = "9",
Type = "MEMORY",
},
},
Type = "MEMORY_OPTIMIZED",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewRegionCommitment(ctx, "foobar", &compute.RegionCommitmentArgs{
AutoRenew: pulumi.Bool(true),
Category: pulumi.String("MACHINE"),
Description: pulumi.String("some description"),
Plan: pulumi.String("THIRTY_SIX_MONTH"),
Resources: compute.RegionCommitmentResourceArray{
&compute.RegionCommitmentResourceArgs{
Amount: pulumi.String("4"),
Type: pulumi.String("VCPU"),
},
&compute.RegionCommitmentResourceArgs{
Amount: pulumi.String("9"),
Type: pulumi.String("MEMORY"),
},
},
Type: pulumi.String("MEMORY_OPTIMIZED"),
})
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.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 pulumi
import pulumi_gcp as gcp
foobar = gcp.compute.RegionCommitment("foobar",
auto_renew=True,
category="MACHINE",
description="some description",
plan="THIRTY_SIX_MONTH",
resources=[
gcp.compute.RegionCommitmentResourceArgs(
amount="4",
type="VCPU",
),
gcp.compute.RegionCommitmentResourceArgs(
amount="9",
type="MEMORY",
),
],
type="MEMORY_OPTIMIZED")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foobar = new gcp.compute.RegionCommitment("foobar", {
autoRenew: true,
category: "MACHINE",
description: "some description",
plan: "THIRTY_SIX_MONTH",
resources: [
{
amount: "4",
type: "VCPU",
},
{
amount: "9",
type: "MEMORY",
},
],
type: "MEMORY_OPTIMIZED",
});
resources:
foobar:
type: gcp:compute:RegionCommitment
properties:
autoRenew: true
category: MACHINE
description: some description
plan: THIRTY_SIX_MONTH
resources:
- amount: '4'
type: VCPU
- amount: '9'
type: MEMORY
type: MEMORY_OPTIMIZED
Create RegionCommitment Resource
new RegionCommitment(name: string, args: RegionCommitmentArgs, opts?: CustomResourceOptions);
@overload
def RegionCommitment(resource_name: str,
opts: Optional[ResourceOptions] = None,
auto_renew: Optional[bool] = None,
category: Optional[str] = None,
description: Optional[str] = None,
license_resource: Optional[RegionCommitmentLicenseResourceArgs] = None,
name: Optional[str] = None,
plan: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
resources: Optional[Sequence[RegionCommitmentResourceArgs]] = None,
type: Optional[str] = None)
@overload
def RegionCommitment(resource_name: str,
args: RegionCommitmentArgs,
opts: Optional[ResourceOptions] = None)
func NewRegionCommitment(ctx *Context, name string, args RegionCommitmentArgs, opts ...ResourceOption) (*RegionCommitment, error)
public RegionCommitment(string name, RegionCommitmentArgs args, CustomResourceOptions? opts = null)
public RegionCommitment(String name, RegionCommitmentArgs args)
public RegionCommitment(String name, RegionCommitmentArgs args, CustomResourceOptions options)
type: gcp:compute:RegionCommitment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionCommitmentArgs
- 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 RegionCommitmentArgs
- 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 RegionCommitmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionCommitmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegionCommitmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RegionCommitment 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 RegionCommitment resource accepts the following input properties:
- Plan string
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
.- Auto
Renew bool 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.
- Category string
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
.- Description string
An optional description of this resource.
- License
Resource RegionCommitment License Resource The license specification required as part of a license commitment. Structure is documented below.
- Name string
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.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
URL of the region where this commitment may be used.
- Resources
List<Region
Commitment Resource> A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- Type string
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
andGRAPHICS_OPTIMIZED_G2
- Plan string
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
.- Auto
Renew bool 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.
- Category string
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
.- Description string
An optional description of this resource.
- License
Resource RegionCommitment License Resource Args The license specification required as part of a license commitment. Structure is documented below.
- Name string
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.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
URL of the region where this commitment may be used.
- Resources
[]Region
Commitment Resource Args A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- Type string
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
andGRAPHICS_OPTIMIZED_G2
- plan String
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
.- auto
Renew Boolean 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.
- category String
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
.- description String
An optional description of this resource.
- license
Resource RegionCommitment License Resource The license specification required as part of a license commitment. Structure is documented below.
- name String
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.- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
URL of the region where this commitment may be used.
- resources
List<Region
Commitment Resource> A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- type String
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
andGRAPHICS_OPTIMIZED_G2
- plan string
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
.- auto
Renew boolean 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.
- category string
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
.- description string
An optional description of this resource.
- license
Resource RegionCommitment License Resource The license specification required as part of a license commitment. Structure is documented below.
- name string
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.- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
URL of the region where this commitment may be used.
- resources
Region
Commitment Resource[] A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- type string
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
andGRAPHICS_OPTIMIZED_G2
- plan str
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
.- auto_
renew bool 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.
- category str
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
.- description str
An optional description of this resource.
- license_
resource RegionCommitment License Resource Args The license specification required as part of a license commitment. Structure is documented below.
- name str
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.- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
URL of the region where this commitment may be used.
- resources
Sequence[Region
Commitment Resource Args] A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- type str
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
andGRAPHICS_OPTIMIZED_G2
- plan String
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
.- auto
Renew Boolean 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.
- category String
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
.- description String
An optional description of this resource.
- license
Resource Property Map The license specification required as part of a license commitment. Structure is documented below.
- name String
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.- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
URL of the region where this commitment may be used.
- resources List<Property Map>
A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- type String
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
andGRAPHICS_OPTIMIZED_G2
Outputs
All input properties are implicitly available as output properties. Additionally, the RegionCommitment resource produces the following output properties:
- Commitment
Id int Unique identifier for the resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- End
Timestamp string Commitment end time in RFC3339 text format.
- Id string
The provider-assigned unique ID for this managed resource.
- Self
Link string The URI of the created resource.
- Start
Timestamp string Commitment start time in RFC3339 text format.
- Status string
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- Status
Message string A human-readable explanation of the status.
- Commitment
Id int Unique identifier for the resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- End
Timestamp string Commitment end time in RFC3339 text format.
- Id string
The provider-assigned unique ID for this managed resource.
- Self
Link string The URI of the created resource.
- Start
Timestamp string Commitment start time in RFC3339 text format.
- Status string
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- Status
Message string A human-readable explanation of the status.
- commitment
Id Integer Unique identifier for the resource.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- end
Timestamp String Commitment end time in RFC3339 text format.
- id String
The provider-assigned unique ID for this managed resource.
- self
Link String The URI of the created resource.
- start
Timestamp String Commitment start time in RFC3339 text format.
- status String
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status
Message String A human-readable explanation of the status.
- commitment
Id number Unique identifier for the resource.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- end
Timestamp string Commitment end time in RFC3339 text format.
- id string
The provider-assigned unique ID for this managed resource.
- self
Link string The URI of the created resource.
- start
Timestamp string Commitment start time in RFC3339 text format.
- status string
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status
Message string A human-readable explanation of the status.
- commitment_
id int Unique identifier for the resource.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- end_
timestamp str Commitment end time in RFC3339 text format.
- id str
The provider-assigned unique ID for this managed resource.
- self_
link str The URI of the created resource.
- start_
timestamp str Commitment start time in RFC3339 text format.
- status str
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status_
message str A human-readable explanation of the status.
- commitment
Id Number Unique identifier for the resource.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- end
Timestamp String Commitment end time in RFC3339 text format.
- id String
The provider-assigned unique ID for this managed resource.
- self
Link String The URI of the created resource.
- start
Timestamp String Commitment start time in RFC3339 text format.
- status String
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status
Message String A human-readable explanation of the status.
Look up Existing RegionCommitment Resource
Get an existing RegionCommitment 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?: RegionCommitmentState, opts?: CustomResourceOptions): RegionCommitment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_renew: Optional[bool] = None,
category: Optional[str] = None,
commitment_id: Optional[int] = None,
creation_timestamp: Optional[str] = None,
description: Optional[str] = None,
end_timestamp: Optional[str] = None,
license_resource: Optional[RegionCommitmentLicenseResourceArgs] = None,
name: Optional[str] = None,
plan: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
resources: Optional[Sequence[RegionCommitmentResourceArgs]] = None,
self_link: Optional[str] = None,
start_timestamp: Optional[str] = None,
status: Optional[str] = None,
status_message: Optional[str] = None,
type: Optional[str] = None) -> RegionCommitment
func GetRegionCommitment(ctx *Context, name string, id IDInput, state *RegionCommitmentState, opts ...ResourceOption) (*RegionCommitment, error)
public static RegionCommitment Get(string name, Input<string> id, RegionCommitmentState? state, CustomResourceOptions? opts = null)
public static RegionCommitment get(String name, Output<String> id, RegionCommitmentState 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.
- Auto
Renew bool 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.
- Category string
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
.- Commitment
Id int Unique identifier for the resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
An optional description of this resource.
- End
Timestamp string Commitment end time in RFC3339 text format.
- License
Resource RegionCommitment License Resource The license specification required as part of a license commitment. Structure is documented below.
- Name string
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.- Plan string
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
.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
URL of the region where this commitment may be used.
- Resources
List<Region
Commitment Resource> A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- Self
Link string The URI of the created resource.
- Start
Timestamp string Commitment start time in RFC3339 text format.
- Status string
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- Status
Message string A human-readable explanation of the status.
- Type string
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
andGRAPHICS_OPTIMIZED_G2
- Auto
Renew bool 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.
- Category string
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
.- Commitment
Id int Unique identifier for the resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
An optional description of this resource.
- End
Timestamp string Commitment end time in RFC3339 text format.
- License
Resource RegionCommitment License Resource Args The license specification required as part of a license commitment. Structure is documented below.
- Name string
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.- Plan string
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
.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
URL of the region where this commitment may be used.
- Resources
[]Region
Commitment Resource Args A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- Self
Link string The URI of the created resource.
- Start
Timestamp string Commitment start time in RFC3339 text format.
- Status string
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- Status
Message string A human-readable explanation of the status.
- Type string
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
andGRAPHICS_OPTIMIZED_G2
- auto
Renew Boolean 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.
- category String
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
.- commitment
Id Integer Unique identifier for the resource.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- description String
An optional description of this resource.
- end
Timestamp String Commitment end time in RFC3339 text format.
- license
Resource RegionCommitment License Resource The license specification required as part of a license commitment. Structure is documented below.
- name String
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.- plan String
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
.- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
URL of the region where this commitment may be used.
- resources
List<Region
Commitment Resource> A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- self
Link String The URI of the created resource.
- start
Timestamp String Commitment start time in RFC3339 text format.
- status String
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status
Message String A human-readable explanation of the status.
- type String
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
andGRAPHICS_OPTIMIZED_G2
- auto
Renew boolean 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.
- category string
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
.- commitment
Id number Unique identifier for the resource.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- description string
An optional description of this resource.
- end
Timestamp string Commitment end time in RFC3339 text format.
- license
Resource RegionCommitment License Resource The license specification required as part of a license commitment. Structure is documented below.
- name string
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.- plan string
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
.- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
URL of the region where this commitment may be used.
- resources
Region
Commitment Resource[] A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- self
Link string The URI of the created resource.
- start
Timestamp string Commitment start time in RFC3339 text format.
- status string
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status
Message string A human-readable explanation of the status.
- type string
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
andGRAPHICS_OPTIMIZED_G2
- auto_
renew bool 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.
- category str
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
.- commitment_
id int Unique identifier for the resource.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- description str
An optional description of this resource.
- end_
timestamp str Commitment end time in RFC3339 text format.
- license_
resource RegionCommitment License Resource Args The license specification required as part of a license commitment. Structure is documented below.
- name str
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.- plan str
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
.- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
URL of the region where this commitment may be used.
- resources
Sequence[Region
Commitment Resource Args] A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- self_
link str The URI of the created resource.
- start_
timestamp str Commitment start time in RFC3339 text format.
- status str
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status_
message str A human-readable explanation of the status.
- type str
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
andGRAPHICS_OPTIMIZED_G2
- auto
Renew Boolean 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.
- category String
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
.- commitment
Id Number Unique identifier for the resource.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- description String
An optional description of this resource.
- end
Timestamp String Commitment end time in RFC3339 text format.
- license
Resource Property Map The license specification required as part of a license commitment. Structure is documented below.
- name String
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.- plan String
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
.- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
URL of the region where this commitment may be used.
- resources List<Property Map>
A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. Structure is documented below.
- self
Link String The URI of the created resource.
- start
Timestamp String Commitment start time in RFC3339 text format.
- status String
Status of the commitment with regards to eventual expiration (each commitment has an end date defined).
- status
Message String A human-readable explanation of the status.
- type String
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
andGRAPHICS_OPTIMIZED_G2
Supporting Types
RegionCommitmentLicenseResource, RegionCommitmentLicenseResourceArgs
- License string
Any applicable license URI.
- Amount string
The number of licenses purchased.
- Cores
Per stringLicense Specifies the core range of the instance for which this license applies.
- License string
Any applicable license URI.
- Amount string
The number of licenses purchased.
- Cores
Per stringLicense Specifies the core range of the instance for which this license applies.
- license String
Any applicable license URI.
- amount String
The number of licenses purchased.
- cores
Per StringLicense Specifies the core range of the instance for which this license applies.
- license string
Any applicable license URI.
- amount string
The number of licenses purchased.
- cores
Per stringLicense Specifies the core range of the instance for which this license applies.
- license str
Any applicable license URI.
- amount str
The number of licenses purchased.
- cores_
per_ strlicense Specifies the core range of the instance for which this license applies.
- license String
Any applicable license URI.
- amount String
The number of licenses purchased.
- cores
Per StringLicense Specifies the core range of the instance for which this license applies.
RegionCommitmentResource, RegionCommitmentResourceArgs
- Accelerator
Type string Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- Amount string
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
- Type string
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
- Accelerator
Type string Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- Amount string
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
- Type string
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
- accelerator
Type String Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- amount String
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
- type String
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
- accelerator
Type string Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- amount string
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
- type string
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
- accelerator_
type str Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- amount str
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
- type str
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
- accelerator
Type String Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.
- amount String
The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.
- type String
Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.
Import
RegionCommitment can be imported using any of these accepted formats* projects/{{project}}/regions/{{region}}/commitments/{{name}}
* {{project}}/{{region}}/{{name}}
* {{region}}/{{name}}
* {{name}}
In Terraform v1.5.0 and later, use an import
block to import RegionCommitment using one of the formats above. For exampletf import {
id = “projects/{{project}}/regions/{{region}}/commitments/{{name}}”
to = google_compute_region_commitment.default }
$ pulumi import gcp:compute/regionCommitment:RegionCommitment When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), RegionCommitment can be imported using one of the formats above. For example
$ 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}}
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.