CostScenario

Encapsulates all the information needed to perform a cost estimate. It includes a specification of the Google Cloud usage whose costs are estimated, and configuration options.

JSON representation
{
  "workloads": [
    {
      object (Workload)
    }
  ],
  "commitments": [
    {
      object (Commitment)
    }
  ],
  "scenarioConfig": {
    object (ScenarioConfig)
  }
}
Fields
workloads[]

object (Workload)

The Google Cloud usage whose costs are estimated.

A maximum of 100 workloads can be provided.

commitments[]

object (Commitment)

New commitments to estimate the costs for.

The cost of the commitments will be included in the estimate result and discounts the commitment entitles will be included in the workload cost estimates.

A maximum of 100 workloads can be provided.

scenarioConfig

object (ScenarioConfig)

Configuration for the scenario.

Workload

Specifies usage on a single Google Cloud product over a time frame.

Each Google Cloud product has its own message, containing specific product configuration parameters of the product usage amounts along each dimension in which the product is billed.

JSON representation
{
  "name": string,

  // Union field product_spec can be only one of the following:
  "computeVmWorkload": {
    object (ComputeVmWorkload)
  },
  "cloudStorageWorkload": {
    object (CloudStorageWorkload)
  },
  "cloudStorageEgressWorkload": {
    object (CloudStorageEgressWorkload)
  },
  "cloudCdnWorkload": {
    object (CloudCdnWorkload)
  },
  "cloudCdnEgressWorkload": {
    object (CloudCdnEgressWorkload)
  },
  "cloudInterconnectWorkload": {
    object (CloudInterconnectWorkload)
  },
  "cloudInterconnectEgressWorkload": {
    object (CloudInterconnectEgressWorkload)
  },
  "standardTierEgressWorkload": {
    object (StandardTierEgressWorkload)
  },
  "premiumTierEgressWorkload": {
    object (PremiumTierEgressWorkload)
  },
  "vmToVmEgressWorkload": {
    object (VmToVmEgressWorkload)
  }
  // End of list of possible types for union field product_spec.
}
Fields
name

string

Required. A name for this workload.

All workloads in a CostScenario must have a unique name. Each name may be at most 128 characters long.

Union field product_spec. The product specific configuration and usage specification. product_spec can be only one of the following:
computeVmWorkload

object (ComputeVmWorkload)

Usage of a Google Compute Engine Virtual Machine.

cloudStorageWorkload

object (CloudStorageWorkload)

Usage on Google Cloud Storage.

cloudStorageEgressWorkload

object (CloudStorageEgressWorkload)

Usage on Cloud Storage Data Transfer.

cloudCdnWorkload

object (CloudCdnWorkload)

Usage on Google Cloud CDN.

cloudCdnEgressWorkload

object (CloudCdnEgressWorkload)

Usage on Google Cloud CDN Data Transfer.

cloudInterconnectWorkload

object (CloudInterconnectWorkload)

Usage on Google Cloud Interconnect.

cloudInterconnectEgressWorkload

object (CloudInterconnectEgressWorkload)

Usage on Google Cloud Interconnect Data Transfer.

standardTierEgressWorkload

object (StandardTierEgressWorkload)

Usage on Standard Tier Internet Data Transfer.

premiumTierEgressWorkload

object (PremiumTierEgressWorkload)

Usage on Premium Tier Internet Data Transfer.

vmToVmEgressWorkload

object (VmToVmEgressWorkload)

Usage on VM to VM Data Transfer.

ComputeVmWorkload

Specificies usage of a set of identical compute VM instances.

JSON representation
{
  "region": string,
  "machineType": {
    object (MachineType)
  },
  "guestAccelerator": {
    object (GuestAccelerator)
  },
  "preemptible": boolean,
  "enableConfidentialCompute": boolean,
  "licenses": [
    string
  ],
  "persistentDisks": [
    {
      object (PersistentDisk)
    }
  ],
  "instancesRunning": {
    object (Usage)
  }
}
Fields
region

string

The region where the VMs run. For example: "us-central1".

machineType

object (MachineType)

The machine type.

guestAccelerator

object (GuestAccelerator)

Guest accelerators attached to each machine.

preemptible

boolean

Defines whether each instance is preemptible.

enableConfidentialCompute

boolean

Defines whether each instance has confidential compute enabled.

licenses[]

string

Premium image licenses used by each instance.

persistentDisks[]

object (PersistentDisk)

Persistent disks attached to each instance. Must include a boot disk.

instancesRunning

object (Usage)

VM usage. This is specified as a unitless quantity which indicates the number of instances running.

MachineType

Specification of machine series, memory, and number of vCPUs.

JSON representation
{

  // Union field machine_type can be only one of the following:
  "predefinedMachineType": {
    object (PredefinedMachineType)
  },
  "customMachineType": {
    object (CustomMachineType)
  }
  // End of list of possible types for union field machine_type.
}
Fields

Union field machine_type.

machine_type can be only one of the following:

predefinedMachineType

object (PredefinedMachineType)

customMachineType

object (CustomMachineType)

PredefinedMachineType

Specification of a predefined machine type.

JSON representation
{
  "machineType": string
}
Fields
machineType

string

The machine type. For example: "n1-standard1".

CustomMachineType

Specification of a custom machine type.

JSON representation
{
  "machineSeries": string,
  "virtualCpuCount": string,
  "memorySizeGb": number
}
Fields
machineSeries

string

Required. The machine series. Only certain machine series support custom configurations. For example: "n1".

virtualCpuCount

string (int64 format)

Required. The number of vCPUs. The allowed values depend on the machine series.

memorySizeGb

number

Required. Memory size of the VM in GB (2^30 bytes). Must be an increment of 0.25 (256 MB). Each machine series has limitations on allowed values for the ratio of memory-to-vCPU count.

GuestAccelerator

Specification of a set of guest accelerators attached to a machine.

JSON representation
{
  "acceleratorType": string,
  "acceleratorCount": string
}
Fields
acceleratorType

string

The type of the guest accelerator cards. For example: "nvidia-tesla-t4".

acceleratorCount

string (int64 format)

The number of the guest accelerator cards exposed to each instance.

PersistentDisk

Specification of a persistent disk attached to a VM.

JSON representation
{
  "diskType": string,
  "scope": enum (Scope),
  "diskSize": {
    object (Usage)
  },
  "provisionedIops": {
    object (Usage)
  }
}
Fields
diskType

string

The disk type. For example: "pd-standard".

scope

enum (Scope)

The geographic scope of the disk. Defaults to SCOPE_ZONAL if not specified.

diskSize

object (Usage)

Specifies the size of disk. Must be at least 10 GB.

provisionedIops

object (Usage)

Indicates how many IOPS to provision for the disk for extreme persistent disks. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000.

Scope

The geographic scope of the disk.

Enums
SCOPE_UNSPECIFIED Unspecified.
SCOPE_ZONAL The disk exists in a single zone.
SCOPE_REGIONAL The disk is replicated in a secondary zone within the same region.

Usage

An amount of usage over a time frame.

JSON representation
{

  // Union field usage_spec can be only one of the following:
  "usageRateTimeline": {
    object (UsageRateTimeline)
  }
  // End of list of possible types for union field usage_spec.
}
Fields

Union field usage_spec.

usage_spec can be only one of the following:

usageRateTimeline

object (UsageRateTimeline)

A timeline of usage rates over the estimate interval.

UsageRateTimeline

A timeline of usage rates.

Consists of a series of entries, each of which specifies a constant rate of usage during a time interval. Each entry contains an effective time. The usage rate is in effect from that time until the effective time of the subsequent entry, or, for the last entry, for the remaining portion of estimation time frame.

Effective times are specified as an offset into the estimation time frame. Usage is considered to be zero until the effectiveTime of the first entry. All subsequent entries must have an effective time greater than the previous entry and less than the estimate time frame.

The effective time on all entries must be an integer number of hours.

JSON representation
{
  "unit": string,
  "usageRateTimelineEntries": [
    {
      object (UsageRateTimelineEntry)
    }
  ]
}
Fields
unit

string

The unit for the usage rate in each timeline entry. If you provide an incorrect unit for an instance, the correct unit is provided in the error message.

The supported units are a subset of The Unified Code for Units of Measure standard:

  • Time units (TIME-UNIT)
    • s second
    • min minute
    • h hour
    • d day
    • wk week
    • mo month
    • yr year
    • ms millisecond
    • us microsecond
    • ns nanosecond
  • Basic storage units (BASIC-STORAGE-UNIT)
    • bit bit
    • By byte
  • Count units (COUNT-UNIT)
    • count count
  • Prefixes (PREFIX)
    • k kilo (10^3)
    • M mega (10^6)
    • G giga (10^9)
    • T tera (10^12)
    • P peta (10^15)
    • Ki kibi (2^10)
    • Mi mebi (2^20)
    • Gi gibi (2^30)
    • Ti tebi (2^40)
    • Pi pebi (2^50)

Grammar

The grammar also includes these connectors:

  • / division or ratio (as an infix operator). For example: kBy/{email} or MiBy/10ms.
  • . multiplication or composition (as an infix operator). For example: GBy.d or k{watt}.h.

The grammar for a unit is as follows:

Expression = Component { "." Component } { "/" Component } ;

Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
     | Annotation
     | "1"
     ;

UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT

Annotation = "{" NAME "}" ;

Examples:

  • Request per second: 1/s or {requests}/s
  • GibiBytes: GiBy
  • GibiBytes * seconds: GiBy.s
usageRateTimelineEntries[]

object (UsageRateTimelineEntry)

The timeline entries. Each entry has a start time and usage rate. The start time specifies the effective time of the usage rate. The entries must be sorted by start time in an increasing order.

UsageRateTimelineEntry

A usage rate timeline entry.

Each entry specifies a constant usage rate during a time interval.

JSON representation
{
  "effectiveTime": {
    object (EstimationTimePoint)
  },
  "usageRate": number
}
Fields
effectiveTime

object (EstimationTimePoint)

The effective time for this entry. The usage rate is in effect starting at this time until the effective time of the subsequent entry in the timeline. The last entry defines the usage rate until the end of the Usage time frame.

Must correspond to an integer number of hours.

usageRate

number

The usage rate.

CloudStorageWorkload

Specifies usage of Cloud Storage resources.

JSON representation
{
  "storageClass": string,
  "dataStored": {
    object (Usage)
  },
  "operationA": {
    object (Usage)
  },
  "operationB": {
    object (Usage)
  },
  "dataRetrieval": {
    object (Usage)
  },

  // Union field location can be only one of the following:
  "region": {
    object (Regional)
  },
  "multiRegion": {
    object (MultiRegional)
  },
  "dualRegion": {
    object (DualRegional)
  }
  // End of list of possible types for union field location.
}
Fields
storageClass

string

The storage class of the data and operation. For example: "standard" and "nearline".

dataStored

object (Usage)

Data storage usage. The amount of data stored in buckets. For example: units such as GiBy/s or TiBy/mo, based on The Unified Code for Units of Measure standard.

operationA

object (Usage)

Class A operation usage in Cloud Storage, such as listing the objects in buckets. See the operations pricing tables for a list of which operations fall into each class. For example: units such as "1/s".

operationB

object (Usage)

Class B operation usage in Cloud Storage, such as getIamPolicy. See the operations pricing tables for a list of which operations fall into each class. For example: units such as "1/s".

dataRetrieval

object (Usage)

Data retrieval usage. A retrieval cost applies when data or metadata is read, copied, or rewritten . For example: units such as "GiB/s" or "B/s".

Union field location.

location can be only one of the following:

region

object (Regional)

Specify a single region.

multiRegion

object (MultiRegional)

Specify multi regions.

dualRegion

object (DualRegional)

Specify dual regions.

Regional

Area contains only one location.

JSON representation
{
  "name": string
}
Fields
name

string

The location name. For example: "us-central1" for region.

MultiRegional

Area contains multiple locations.

JSON representation
{
  "name": string
}
Fields
name

string

The location name where the data is stored. For example: "us" for multi-region.

DualRegional

Area contains dual locations.

JSON representation
{
  "name": string
}
Fields
name

string

The location name where the data is stored. For example: "asia1" for dual region.

CloudStorageEgressWorkload

Specification of a network type. Network data transfer within Google Cloud applies when you move or copy data from one Cloud Storage bucket to another or when another Google Cloud service accesses data in your Cloud Storage bucket.This includes the network data transfer within Google Cloud and the general network usage.

JSON representation
{
  "sourceContinent": enum (SourceContinent),
  "destinationContinent": enum (DestinationContinent),
  "egressRate": {
    object (Usage)
  }
}
Fields
sourceContinent

enum (SourceContinent)

Where the data comes from.

destinationContinent

enum (DestinationContinent)

Where the data is sent to.

egressRate

object (Usage)

Data transfer usage rate. This usage applies when you move or copy data from one Cloud Storage bucket to another or when another Google Cloud service accesses data in your Cloud Storage bucket. The expected units are GiBy/s, By/s, and so on, based on The Unified Code for Units of Measure standard.

SourceContinent

Specify the source continent.

Enums
SOURCE_CONTINENT_UNSPECIFIED Not specified.
SOURCE_CONTINENT_ASIA_PACIFIC Asia Pacific.
SOURCE_CONTINENT_AUSTRALIA Australia.
SOURCE_CONTINENT_EUROPE Europe.
SOURCE_CONTINENT_NORTH_AMERICA North America.
SOURCE_CONTINENT_SOUTH_AMERICA South America.

DestinationContinent

Specify the destination continent.

Enums
DESTINATION_CONTINENT_UNSPECIFIED Not specified.
DESTINATION_CONTINENT_ASIA_PACIFIC Asia Pacific.
DESTINATION_CONTINENT_AUTRALIA Australia.
DESTINATION_CONTINENT_EUROPE Europe.
DESTINATION_CONTINENT_NORTH_AMERICA North America.
DESTINATION_CONTINENT_SOUTH_AMERICA South America

CloudCdnWorkload

Specifies usage for Cloud CDN resources.

JSON representation
{
  "cacheLookUpRate": {
    object (Usage)
  },
  "cacheFillOriginService": enum (CacheFillOriginService),
  "cacheFillRegions": {
    object (CacheFillRegions)
  },
  "cacheFillRate": {
    object (Usage)
  }
}
Fields
cacheLookUpRate

object (Usage)

Cache look up requests. This is specified to indicate the number of requests. For example: units such as "1/s".

cacheFillOriginService

enum (CacheFillOriginService)

The source service for the cache fill.

cacheFillRegions

object (CacheFillRegions)

The regions where data is transferred from Google data locations into Google global cache servers. The SKU prices for cache fill across services are the same.

cacheFillRate

object (Usage)

Cache fill usage. The rate of data transferred between cache fill regions. For example: units such as "GiBy/s" or "TBy/mo".

CacheFillOriginService

Specifies the cache fill source service.

Enums
CACHE_FILL_ORIGIN_SERVICE_UNSPECIFIED Not specified.
CACHE_FILL_ORIGIN_SERVICE_GOOGLE_CLOUD_STORAGE_BUCKET Origin service is Google Cloud Storage.
CACHE_FILL_ORIGIN_SERVICE_BACKEND_SERVICE Origin service is backend service, such as Compute VMs, external backend, etc.

CacheFillRegions

Specifies the regions for Cache Fill.

JSON representation
{
  "sourceRegion": enum (CacheFillSourceRegion),
  "destinationRegion": enum (CacheFillDestinationRegion)
}
Fields
sourceRegion

enum (CacheFillSourceRegion)

The source region for cache fill.

destinationRegion

enum (CacheFillDestinationRegion)

The destination region for cache fill.

CacheFillSourceRegion

Specifies the cache fill source region.

Enums
CACHE_FILL_SOURCE_REGION_UNSPECIFIED Not specified
CACHE_FILL_REGION_ASIA_PACIFIC Asia Pacific
CACHE_FILL_SOURCE_REGION_EUROPE Europe
CACHE_FILL_SOURCE_REGION_NORTH_AMERICA North America
CACHE_FILL_SOURCE_REGION_OCEANIA Oceania
CACHE_FILL_SOURCE_REGION_SOUTH_AMERICA South America

CacheFillDestinationRegion

Specifies the cache fill destination region.

Enums
CACHE_FILL_DESTINATION_REGION_UNSPECIFIED Not specified
CACHE_FILL_DESTINATION_REGION_ASIA_PACIFIC Asia Pacific
CACHE_FILL_DESTINATION_REGION_EUROPE Europe
CACHE_FILL_DESTINATION_REGION_NORTH_AMERICA North America
CACHE_FILL_DESTINATION_REGION_OCEANIA Oceania
CACHE_FILL_DESTINATION_REGION_SOUTH_AMERICA South America
CACHE_FILL_DESTINATION_REGION_CHINA China
CACHE_FILL_DESTINATION_REGION_OTHERS Others

CloudCdnEgressWorkload

Specifies usage for Cloud CDN Data Transfer.

JSON representation
{
  "cacheEgressDestination": enum (CacheEgressDestination),
  "cacheEgressRate": {
    object (Usage)
  }
}
Fields
cacheEgressDestination

enum (CacheEgressDestination)

The destination for the cache data transfer.

cacheEgressRate

object (Usage)

Cache data transfer usage. The rate of data cache transferred to the destination. Use units such as GiBy/s or TiBy/mo, based on The Unified Code for Units of Measure standard.

CacheEgressDestination

Destination for cache data transfer.

Enums
CACHE_EGRESS_DESTINATION_UNSPECIFIED Unspecified.
CACHE_EGRESS_DESTINATION_ASIA_PACIFIC Asia Pacific.
CACHE_EGRESS_DESTINATION_CHINA China.
CACHE_EGRESS_DESTINATION_EUROPE Europe.
CACHE_EGRESS_DESTINATION_NORTH_AMERICA North America.
CACHE_EGRESS_DESTINATION_OCEANIA Oceania including Australia, New Zealand, and surrounding Pacific Ocean islands such as Papua New Guinea and Fiji. This region excludes Hawaii.
CACHE_EGRESS_DESTINATION_LATIN_AMERICA Latin America (Including the Caribbean, South America and Central America.)
CACHE_EGRESS_DESTINATION_OTHER_DESTINATIONS All other destinations (including Africa and Antarctica)

CloudInterconnectWorkload

Specifies usage for Cloud Interconnect resources.

JSON representation
{
  "linkType": enum (LinkType),
  "interconnectType": enum (InterconnectType),
  "provisionedLinkCount": {
    object (Usage)
  },
  "interconnectAttachments": [
    {
      object (VlanAttachment)
    }
  ]
}
Fields
interconnectType

enum (InterconnectType)

VLAN attachment type

interconnectAttachments[]

object (VlanAttachment)

VLAN attachment used for interconnect.

LinkType

Specifies the interconnect circuit link type.

Enums

InterconnectType

Specifies the VLAN attachment type.

Enums
INTERCONNECT_TYPE_UNSPECIFIED Unspecified
INTERCONNECT_TYPE_DEDICATED Type is dedicated
INTERCONNECT_TYPE_PARTNER Type is partner

VlanAttachment

VLAN attachment for Cloud Interconnect.

JSON representation
{
  "bandwidth": enum (Bandwidth),
  "vlanCount": {
    object (Usage)
  }
}
Fields
bandwidth

enum (Bandwidth)

Capacities in the pricing table Examples of capacity are: 50/100/200/300/400/500-Mbps, 1/2/5/10/20/50-Gbps.

vlanCount

object (Usage)

VLAN usage. This is specified as a unitless quantity which indicates the number of VLAN attachment used in interconnect.

Bandwidth

Provisioned bandwidth capacity for the interconnect VLAN attachment.

Enums
BANDWIDTH_UNSPECIFIED Unspecified
BANDWIDTH_BPS_50M 50 Mbit/s
BANDWIDTH_BPS_100M 100 Mbit/s
BANDWIDTH_BPS_200M 200 Mbit/s
BANDWIDTH_BPS_300M 300 Mbit/s
BANDWIDTH_BPS_400M 400 Mbit/s
BANDWIDTH_BPS_500M 500 Mbit/s
BANDWIDTH_BPS_1G 1 Gbit/s
BANDWIDTH_BPS_2G 2 Gbit/s
BANDWIDTH_BPS_5G 5 Gbit/s
BANDWIDTH_BPS_10G 10 Gbit/s
BANDWIDTH_BPS_20G 20 Gbit/s
BANDWIDTH_BPS_50G 50 Gbit/s

CloudInterconnectEgressWorkload

Includes the estimate for Interconnect Data Transfer only. To specify usage for data transfer between VMs and internet end-points, use the Standard Tier Internet Data Transfer interface.

JSON representation
{
  "interconnectConnectionLocation": enum (InterconnectConnectionLocation),
  "egressRate": {
    object (Usage)
  }
}
Fields
interconnectConnectionLocation

enum (InterconnectConnectionLocation)

Locations in the Interconnect connection location table. These are the Interconnect Data Transfer charges.

egressRate

object (Usage)

Outbound data transfer usage. This usage applies when you move or copy data from one Google Cloud service to another service. The units are GiBy/s, By/s, and so on, based on The Unified Code for Units of Measure standard.

InterconnectConnectionLocation

Specify the Cloud Interconnect connection location. This determines the outbound data transfer charges.

Enums
INTERCONNECT_CONNECTION_LOCATION_UNSPECIFIED Unspecified.
INTERCONNECT_CONNECTION_LOCATION_ASIA Asia.
INTERCONNECT_CONNECTION_LOCATION_EUROPE Europe.
INTERCONNECT_CONNECTION_LOCATION_NORTH_AMERICA North America.
INTERCONNECT_CONNECTION_LOCATION_SOUTH_AMERICA South America.
INTERCONNECT_CONNECTION_LOCATION_AUSTRALIA Australia.

StandardTierEgressWorkload

Specify Standard Tier Internet Data Transfer.

JSON representation
{
  "sourceRegion": string,
  "egressRate": {
    object (Usage)
  }
}
Fields
sourceRegion

string

Which region the data is transferred from.

egressRate

object (Usage)

Standard Tier Data Transfer usage. The expected units are GiBy/s, By/s, and so on, based on the The Unified Code for Units of Measure standard.

PremiumTierEgressWorkload

Specify a Premium Tier Internet Data Transfer networking workload.

JSON representation
{
  "sourceRegion": string,
  "destinationContinent": enum (DestinationContinent),
  "egressRate": {
    object (Usage)
  }
}
Fields
sourceRegion

string

Which region the data comes from.

destinationContinent

enum (DestinationContinent)

Where the data is sent to.

egressRate

object (Usage)

Premium Tier Data Transfer usage. The expected units are GiBy/s, By/s, and so on, based on The Unified Code for Units of Measure standard.

DestinationContinent

Specify the destination continent.

Enums
DESTINATION_CONTINENT_UNSPECIFIED Not specified.
DESTINATION_CONTINENT_ASIA_PACIFIC Asia Pacific.
DESTINATION_CONTINENT_AFRICA Africa.
DESTINATION_CONTINENT_NORTH_AMERICA North America.
DESTINATION_CONTINENT_AUTRALIA Australia.
DESTINATION_CONTINENT_CENTRAL_AMERICA Central America.
DESTINATION_CONTINENT_CHINA China.
DESTINATION_CONTINENT_EASTERN_EUROPE Eastern Europe.
DESTINATION_CONTINENT_WESTERN_EUROPE Western Europe.
DESTINATION_CONTINENT_EMEA Other regions in Europe, Middle East and Africa.
DESTINATION_CONTINENT_INDIA India
DESTINATION_CONTINENT_MIDDLE_EAST Middle East.
DESTINATION_CONTINENT_SOUTH_AMERICA South America.

VmToVmEgressWorkload

Specify VM to VM data transfer.

JSON representation
{

  // Union field egress_location can be only one of the following:
  "interRegionEgress": {
    object (InterRegionEgress)
  },
  "intraRegionEgress": {
    object (IntraRegionEgress)
  }
  // End of list of possible types for union field egress_location.
}
Fields

Union field egress_location.

egress_location can be only one of the following:

interRegionEgress

object (InterRegionEgress)

intraRegionEgress

object (IntraRegionEgress)

InterRegionEgress

Data transfer between two regions.

JSON representation
{
  "sourceRegion": string,
  "destinationRegion": string,
  "egressRate": {
    object (Usage)
  }
}
Fields
sourceRegion

string

Which region the data is transferred from.

destinationRegion

string

Which region the data is transferred to.

egressRate

object (Usage)

VM to VM data transfer usage. The expected units such are GiBy/s, By/s, and so on.

IntraRegionEgress

Data transfer within the same region. When the source region and destination region are in the same zone, using internal IP addresses, there isn't any charge for data transfer.

JSON representation
{
  "egressRate": {
    object (Usage)
  }
}
Fields
egressRate

object (Usage)

VM to VM data transfer usage. The expected are GiBy/s, By/s, and so on.

Commitment

Commitments give you the ability to pay a recurring fee in exchange for a benefit, such as a discount for your use. For example, this object might contain details of a spend-based committed use discount (CUD).

Within a CostScenario, adding a commitment includes the cost of the commitment and any discounts.

JSON representation
{
  "name": string,

  // Union field commitment_spec can be only one of the following:
  "vmResourceBasedCud": {
    object (VmResourceBasedCud)
  }
  // End of list of possible types for union field commitment_spec.
}
Fields
name

string

Required. A name for this commitment.

All commitments in a CostScenario must have unique names. Each name may be at most 128 characters long.

Union field commitment_spec.

commitment_spec can be only one of the following:

vmResourceBasedCud

object (VmResourceBasedCud)

A resource-based committed use discount (CUD).

VmResourceBasedCud

Specifies a resource-based committed use discount (CUD).

JSON representation
{
  "region": string,
  "virtualCpuCount": string,
  "memorySizeGb": number,
  "guestAccelerator": {
    object (GuestAccelerator)
  },
  "plan": enum (CommitmentPlan),
  "machineSeries": string
}
Fields
region

string

The region where the VM runs. For example: "us-central1"

virtualCpuCount

string (int64 format)

The number of vCPUs. The number of vCPUs must be an integer of 0 or more and can be even or odd.

memorySizeGb

number

Memory size of the VM in GB (2^30 bytes). Must be an increment of 0.25 (256 MB).

guestAccelerator

object (GuestAccelerator)

Guest accelerator, known as GPU.

plan

enum (CommitmentPlan)

Commitment usage plan.

machineSeries

string

The machine series for CUD. For example: "n1" for general purpose N1 machine type commitments. "n2" for general purpose N2 machine type commitments. "e2" for general purpose E2 machine type commitments. "n2d" for general purpose N2D machine type commitments. "t2d" for general purpose T2D machine type commitments. "c2"/"c2d" for compute-optimized commitments. "m1"/"m2" for the memory-optimized commitments. "a2' for the accelerator-optimized commitments.

CommitmentPlan

The plan of commitments for VM resource-based committed use discount (CUD).

Enums
COMMITMENT_PLAN_UNSPECIFIED Not specified commitment plan.
TWELVE_MONTH 1 year commitment.
THIRTY_SIX_MONTH 3 years commitment.

ScenarioConfig

Configuration for a CostScenario. Specifies how costs are calculated.

JSON representation
{
  "estimateDuration": string
}
Fields
estimateDuration

string (Duration format)

Time frame for the estimate.

Workloads must specify usage for this duration. Duration must be at least 1 hour (3,600 seconds) and at most 10 years (315,360,000 seconds). The calculations for years and months are based on a 730-hour (2,628,000-second) month.

For durations longer than one month (2,628,000 seconds), the duration is rounded up to the next month, so the estimate shows you the costs for full months. For example, a duration of 3,232,800 seconds (roughly 5 weeks) is rounded up to 2 months.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".