Compute Engine v1 API - Class Commitment (3.2.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
Name Description
other Commitment

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
Type Description
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
Type Description
string

CreationTimestamp

public string CreationTimestamp { get; set; }

[Output Only] Creation timestamp in RFC3339 text format.

Property Value
Type Description
string

CustomEndTimestamp

public string CustomEndTimestamp { get; set; }

[Input Only] Optional, specifies the CUD end time requested by the customer in RFC3339 text format. Needed when the customer wants CUD's end date is later than the start date + term duration.

Property Value
Type Description
string

Description

public string Description { get; set; }

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

Property Value
Type Description
string

EndTimestamp

public string EndTimestamp { get; set; }

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

Property Value
Type Description
string

ExistingReservations

public RepeatedField<string> ExistingReservations { get; }

Specifies the already existing reservations to attach to the Commitment. This field is optional, and it can be a full or partial URL. For example, the following are valid URLs to an reservation: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /reservations/reservation - projects/project/zones/zone/reservations/reservation

Property Value
Type Description
RepeatedFieldstring

HasAutoRenew

public bool HasAutoRenew { get; }

Gets whether the "auto_renew" field is set

Property Value
Type Description
bool

HasCategory

public bool HasCategory { get; }

Gets whether the "category" field is set

Property Value
Type Description
bool

HasCreationTimestamp

public bool HasCreationTimestamp { get; }

Gets whether the "creation_timestamp" field is set

Property Value
Type Description
bool

HasCustomEndTimestamp

public bool HasCustomEndTimestamp { get; }

Gets whether the "custom_end_timestamp" field is set

Property Value
Type Description
bool

HasDescription

public bool HasDescription { get; }

Gets whether the "description" field is set

Property Value
Type Description
bool

HasEndTimestamp

public bool HasEndTimestamp { get; }

Gets whether the "end_timestamp" field is set

Property Value
Type Description
bool

HasId

public bool HasId { get; }

Gets whether the "id" field is set

Property Value
Type Description
bool

HasKind

public bool HasKind { get; }

Gets whether the "kind" field is set

Property Value
Type Description
bool

HasName

public bool HasName { get; }

Gets whether the "name" field is set

Property Value
Type Description
bool

HasPlan

public bool HasPlan { get; }

Gets whether the "plan" field is set

Property Value
Type Description
bool

HasRegion

public bool HasRegion { get; }

Gets whether the "region" field is set

Property Value
Type Description
bool
public bool HasSelfLink { get; }

Gets whether the "self_link" field is set

Property Value
Type Description
bool

HasSplitSourceCommitment

public bool HasSplitSourceCommitment { get; }

Gets whether the "split_source_commitment" field is set

Property Value
Type Description
bool

HasStartTimestamp

public bool HasStartTimestamp { get; }

Gets whether the "start_timestamp" field is set

Property Value
Type Description
bool

HasStatus

public bool HasStatus { get; }

Gets whether the "status" field is set

Property Value
Type Description
bool

HasStatusMessage

public bool HasStatusMessage { get; }

Gets whether the "status_message" field is set

Property Value
Type Description
bool

HasType

public bool HasType { get; }

Gets whether the "type" field is set

Property Value
Type Description
bool

Id

public ulong Id { get; set; }

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

Property Value
Type Description
ulong

Kind

public string Kind { get; set; }

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

Property Value
Type Description
string

LicenseResource

public LicenseResourceCommitment LicenseResource { get; set; }

The license specification required as part of a license commitment.

Property Value
Type Description
LicenseResourceCommitment

MergeSourceCommitments

public RepeatedField<string> MergeSourceCommitments { get; }

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

Property Value
Type Description
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
Type Description
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
Type Description
string

Region

public string Region { get; set; }

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

Property Value
Type Description
string

Reservations

public RepeatedField<Reservation> Reservations { get; }

List of create-on-create reservations for this commitment.

Property Value
Type Description
RepeatedFieldReservation

ResourceStatus

public CommitmentResourceStatus ResourceStatus { get; set; }

[Output Only] Status information for Commitment resource.

Property Value
Type Description
CommitmentResourceStatus

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
Type Description
RepeatedFieldResourceCommitment
public string SelfLink { get; set; }

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

Property Value
Type Description
string

SplitSourceCommitment

public string SplitSourceCommitment { get; set; }

Source commitment to be split into a new commitment.

Property Value
Type Description
string

StartTimestamp

public string StartTimestamp { get; set; }

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

Property Value
Type Description
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
Type Description
string

StatusMessage

public string StatusMessage { get; set; }

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

Property Value
Type Description
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
Type Description
string