Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Commitment

import type { Commitment } from "https://googleapis.deno.dev/v1/compute:v1.ts";

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.

interface Commitment {
autoRenew?: boolean;
category?: "CATEGORY_UNSPECIFIED" | "LICENSE" | "MACHINE";
creationTimestamp?: string;
description?: string;
endTimestamp?: string;
existingReservations?: string[];
id?: bigint;
kind?: string;
licenseResource?: LicenseResourceCommitment;
mergeSourceCommitments?: string[];
name?: string;
plan?: "INVALID" | "THIRTY_SIX_MONTH" | "TWELVE_MONTH";
region?: string;
reservations?: Reservation[];
resources?: ResourceCommitment[];
selfLink?: string;
splitSourceCommitment?: string;
startTimestamp?: string;
status?:
| "ACTIVE"
| "CANCELLED"
| "CREATING"
| "EXPIRED"
| "NOT_YET_ACTIVE";
statusMessage?: string;
type?:
| "ACCELERATOR_OPTIMIZED"
| "ACCELERATOR_OPTIMIZED_A3"
| "COMPUTE_OPTIMIZED"
| "COMPUTE_OPTIMIZED_C2D"
| "COMPUTE_OPTIMIZED_C3"
| "COMPUTE_OPTIMIZED_C3D"
| "COMPUTE_OPTIMIZED_H3"
| "GENERAL_PURPOSE"
| "GENERAL_PURPOSE_E2"
| "GENERAL_PURPOSE_N2"
| "GENERAL_PURPOSE_N2D"
| "GENERAL_PURPOSE_N4"
| "GENERAL_PURPOSE_T2D"
| "GRAPHICS_OPTIMIZED"
| "MEMORY_OPTIMIZED"
| "MEMORY_OPTIMIZED_M3"
| "STORAGE_OPTIMIZED_Z3"
| "TYPE_UNSPECIFIED";
}

§Properties

§
autoRenew?: boolean
[src]

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.

§
category?: "CATEGORY_UNSPECIFIED" | "LICENSE" | "MACHINE"
[src]

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.

§
creationTimestamp?: string
[src]

[Output Only] Creation timestamp in RFC3339 text format.

§
description?: string
[src]

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

§
endTimestamp?: string
[src]

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

§
existingReservations?: string[]
[src]

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

§
id?: bigint
[src]

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

§
kind?: string
[src]

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

§

The license specification required as part of a license commitment.

§
mergeSourceCommitments?: string[]
[src]

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

§
name?: string
[src]

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.

§
plan?: "INVALID" | "THIRTY_SIX_MONTH" | "TWELVE_MONTH"
[src]

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

§
region?: string
[src]

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

§
reservations?: Reservation[]
[src]

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

§

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

§
splitSourceCommitment?: string
[src]

Source commitment to be split into a new commitment.

§
startTimestamp?: string
[src]

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

§
status?: "ACTIVE" | "CANCELLED" | "CREATING" | "EXPIRED" | "NOT_YET_ACTIVE"
[src]

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

§
statusMessage?: string
[src]

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

§
type?: "ACCELERATOR_OPTIMIZED" | "ACCELERATOR_OPTIMIZED_A3" | "COMPUTE_OPTIMIZED" | "COMPUTE_OPTIMIZED_C2D" | "COMPUTE_OPTIMIZED_C3" | "COMPUTE_OPTIMIZED_C3D" | "COMPUTE_OPTIMIZED_H3" | "GENERAL_PURPOSE" | "GENERAL_PURPOSE_E2" | "GENERAL_PURPOSE_N2" | "GENERAL_PURPOSE_N2D" | "GENERAL_PURPOSE_N4" | "GENERAL_PURPOSE_T2D" | "GRAPHICS_OPTIMIZED" | "MEMORY_OPTIMIZED" | "MEMORY_OPTIMIZED_M3" | "STORAGE_OPTIMIZED_Z3" | "TYPE_UNSPECIFIED"
[src]

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.