Compute Engine v1 API - Class Commitment (2.10.0)

public sealed class Commitment : IMessage<Commitment>, IEquatable<Commitment>, IDeepCloneable<Commitment>, IBufferMessage, IMessage

Reference documentation and code samples for the Compute Engine v1 API class Commitment.

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. For full details, read Signing Up for Committed Use Discounts.

Inheritance

object > Commitment

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

Commitment()

public Commitment()

Commitment(Commitment)

public Commitment(Commitment other)
Parameter
NameDescription
otherCommitment

Properties

AutoRenew

public bool AutoRenew { get; set; }

Specifies whether to enable automatic renewal for the commitment. The default value is false if not specified. The field can be updated until the day of the commitment expiration at 12:00am PST. 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.

Property Value
TypeDescription
bool

Category

public string Category { get; set; }

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. Check the Category enum for the list of possible values.

Property Value
TypeDescription
string

CreationTimestamp

public string CreationTimestamp { get; set; }

[Output Only] Creation timestamp in RFC3339 text format.

Property Value
TypeDescription
string

Description

public string Description { get; set; }

An optional description of this resource. Provide this property when you create the resource.

Property Value
TypeDescription
string

EndTimestamp

public string EndTimestamp { get; set; }

[Output Only] Commitment end time in RFC3339 text format.

Property Value
TypeDescription
string

HasAutoRenew

public bool HasAutoRenew { get; }

Gets whether the "auto_renew" field is set

Property Value
TypeDescription
bool

HasCategory

public bool HasCategory { get; }

Gets whether the "category" field is set

Property Value
TypeDescription
bool

HasCreationTimestamp

public bool HasCreationTimestamp { get; }

Gets whether the "creation_timestamp" field is set

Property Value
TypeDescription
bool

HasDescription

public bool HasDescription { get; }

Gets whether the "description" field is set

Property Value
TypeDescription
bool

HasEndTimestamp

public bool HasEndTimestamp { get; }

Gets whether the "end_timestamp" field is set

Property Value
TypeDescription
bool

HasId

public bool HasId { get; }

Gets whether the "id" field is set

Property Value
TypeDescription
bool

HasKind

public bool HasKind { get; }

Gets whether the "kind" field is set

Property Value
TypeDescription
bool

HasName

public bool HasName { get; }

Gets whether the "name" field is set

Property Value
TypeDescription
bool

HasPlan

public bool HasPlan { get; }

Gets whether the "plan" field is set

Property Value
TypeDescription
bool

HasRegion

public bool HasRegion { get; }

Gets whether the "region" field is set

Property Value
TypeDescription
bool
public bool HasSelfLink { get; }

Gets whether the "self_link" field is set

Property Value
TypeDescription
bool

HasSplitSourceCommitment

public bool HasSplitSourceCommitment { get; }

Gets whether the "split_source_commitment" field is set

Property Value
TypeDescription
bool

HasStartTimestamp

public bool HasStartTimestamp { get; }

Gets whether the "start_timestamp" field is set

Property Value
TypeDescription
bool

HasStatus

public bool HasStatus { get; }

Gets whether the "status" field is set

Property Value
TypeDescription
bool

HasStatusMessage

public bool HasStatusMessage { get; }

Gets whether the "status_message" field is set

Property Value
TypeDescription
bool

HasType

public bool HasType { get; }

Gets whether the "type" field is set

Property Value
TypeDescription
bool

Id

public ulong Id { get; set; }

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

Property Value
TypeDescription
ulong

Kind

public string Kind { get; set; }

[Output Only] Type of the resource. Always compute#commitment for commitments.

Property Value
TypeDescription
string

LicenseResource

public LicenseResourceCommitment LicenseResource { get; set; }

The license specification required as part of a license commitment.

Property Value
TypeDescription
LicenseResourceCommitment

MergeSourceCommitments

public RepeatedField<string> MergeSourceCommitments { get; }

List of source commitments to be merged into a new commitment.

Property Value
TypeDescription
RepeatedFieldstring

Name

public string Name { get; set; }

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? 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.

Property Value
TypeDescription
string

Plan

public string Plan { get; set; }

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). Check the Plan enum for the list of possible values.

Property Value
TypeDescription
string

Region

public string Region { get; set; }

[Output Only] URL of the region where this commitment may be used.

Property Value
TypeDescription
string

Reservations

public RepeatedField<Reservation> Reservations { get; }

List of reservations in this commitment.

Property Value
TypeDescription
RepeatedFieldReservation

Resources

public RepeatedField<ResourceCommitment> Resources { get; }

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

Property Value
TypeDescription
RepeatedFieldResourceCommitment
public string SelfLink { get; set; }

[Output Only] Server-defined URL for the resource.

Property Value
TypeDescription
string

SplitSourceCommitment

public string SplitSourceCommitment { get; set; }

Source commitment to be split into a new commitment.

Property Value
TypeDescription
string

StartTimestamp

public string StartTimestamp { get; set; }

[Output Only] Commitment start time in RFC3339 text format.

Property Value
TypeDescription
string

Status

public string Status { get; set; }

[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED. Check the Status enum for the list of possible values.

Property Value
TypeDescription
string

StatusMessage

public string StatusMessage { get; set; }

[Output Only] An optional, human-readable explanation of the status.

Property Value
TypeDescription
string

Type

public string Type { get; set; }

The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines. Check the Type enum for the list of possible values.

Property Value
TypeDescription
string