1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. RegionCommitment
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

gcp.compute.RegionCommitment

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

    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.


    AutoRenew 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.

    LicenseResource RegionCommitmentLicenseResource

    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<RegionCommitmentResource>

    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 and GRAPHICS_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.


    AutoRenew 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.

    LicenseResource RegionCommitmentLicenseResourceArgs

    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 []RegionCommitmentResourceArgs

    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 and GRAPHICS_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.


    autoRenew 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.

    licenseResource RegionCommitmentLicenseResource

    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<RegionCommitmentResource>

    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 and GRAPHICS_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.


    autoRenew 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.

    licenseResource RegionCommitmentLicenseResource

    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 RegionCommitmentResource[]

    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 and GRAPHICS_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 RegionCommitmentLicenseResourceArgs

    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[RegionCommitmentResourceArgs]

    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 and GRAPHICS_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.


    autoRenew 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.

    licenseResource 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 and GRAPHICS_OPTIMIZED_G2

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RegionCommitment resource produces the following output properties:

    CommitmentId int

    Unique identifier for the resource.

    CreationTimestamp string

    Creation timestamp in RFC3339 text format.

    EndTimestamp string

    Commitment end time in RFC3339 text format.

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    StartTimestamp 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).

    StatusMessage string

    A human-readable explanation of the status.

    CommitmentId int

    Unique identifier for the resource.

    CreationTimestamp string

    Creation timestamp in RFC3339 text format.

    EndTimestamp string

    Commitment end time in RFC3339 text format.

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    StartTimestamp 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).

    StatusMessage string

    A human-readable explanation of the status.

    commitmentId Integer

    Unique identifier for the resource.

    creationTimestamp String

    Creation timestamp in RFC3339 text format.

    endTimestamp String

    Commitment end time in RFC3339 text format.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    startTimestamp 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).

    statusMessage String

    A human-readable explanation of the status.

    commitmentId number

    Unique identifier for the resource.

    creationTimestamp string

    Creation timestamp in RFC3339 text format.

    endTimestamp string

    Commitment end time in RFC3339 text format.

    id string

    The provider-assigned unique ID for this managed resource.

    selfLink string

    The URI of the created resource.

    startTimestamp 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).

    statusMessage 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.

    commitmentId Number

    Unique identifier for the resource.

    creationTimestamp String

    Creation timestamp in RFC3339 text format.

    endTimestamp String

    Commitment end time in RFC3339 text format.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    startTimestamp 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).

    statusMessage 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.
    The following state arguments are supported:
    AutoRenew 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.

    CommitmentId int

    Unique identifier for the resource.

    CreationTimestamp string

    Creation timestamp in RFC3339 text format.

    Description string

    An optional description of this resource.

    EndTimestamp string

    Commitment end time in RFC3339 text format.

    LicenseResource RegionCommitmentLicenseResource

    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<RegionCommitmentResource>

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

    SelfLink string

    The URI of the created resource.

    StartTimestamp 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).

    StatusMessage 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 and GRAPHICS_OPTIMIZED_G2

    AutoRenew 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.

    CommitmentId int

    Unique identifier for the resource.

    CreationTimestamp string

    Creation timestamp in RFC3339 text format.

    Description string

    An optional description of this resource.

    EndTimestamp string

    Commitment end time in RFC3339 text format.

    LicenseResource RegionCommitmentLicenseResourceArgs

    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 []RegionCommitmentResourceArgs

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

    SelfLink string

    The URI of the created resource.

    StartTimestamp 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).

    StatusMessage 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 and GRAPHICS_OPTIMIZED_G2

    autoRenew 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.

    commitmentId Integer

    Unique identifier for the resource.

    creationTimestamp String

    Creation timestamp in RFC3339 text format.

    description String

    An optional description of this resource.

    endTimestamp String

    Commitment end time in RFC3339 text format.

    licenseResource RegionCommitmentLicenseResource

    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<RegionCommitmentResource>

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

    selfLink String

    The URI of the created resource.

    startTimestamp 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).

    statusMessage 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 and GRAPHICS_OPTIMIZED_G2

    autoRenew 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.

    commitmentId number

    Unique identifier for the resource.

    creationTimestamp string

    Creation timestamp in RFC3339 text format.

    description string

    An optional description of this resource.

    endTimestamp string

    Commitment end time in RFC3339 text format.

    licenseResource RegionCommitmentLicenseResource

    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 RegionCommitmentResource[]

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

    selfLink string

    The URI of the created resource.

    startTimestamp 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).

    statusMessage 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 and GRAPHICS_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 RegionCommitmentLicenseResourceArgs

    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[RegionCommitmentResourceArgs]

    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 and GRAPHICS_OPTIMIZED_G2

    autoRenew 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.

    commitmentId Number

    Unique identifier for the resource.

    creationTimestamp String

    Creation timestamp in RFC3339 text format.

    description String

    An optional description of this resource.

    endTimestamp String

    Commitment end time in RFC3339 text format.

    licenseResource 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.

    selfLink String

    The URI of the created resource.

    startTimestamp 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).

    statusMessage 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 and GRAPHICS_OPTIMIZED_G2

    Supporting Types

    RegionCommitmentLicenseResource, RegionCommitmentLicenseResourceArgs

    License string

    Any applicable license URI.

    Amount string

    The number of licenses purchased.

    CoresPerLicense string

    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.

    CoresPerLicense string

    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.

    coresPerLicense String

    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.

    coresPerLicense string

    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_license str

    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.

    coresPerLicense String

    Specifies the core range of the instance for which this license applies.

    RegionCommitmentResource, RegionCommitmentResourceArgs

    AcceleratorType 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.

    AcceleratorType 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.

    acceleratorType 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.

    acceleratorType 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.

    acceleratorType 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.

    gcp logo
    Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi