Skip to main content

commitments

Creates, updates, deletes, gets or lists a commitments resource.

Overview

Namecommitments
TypeResource
Iddatadog.cloud_costs.commitments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
commitment_idstringThe unique identifier of the Reserved Instance. (example: ri-0123456789abcdef0)
benefit_namestringThe display name of the Azure reservation. (example: my-vm-reservation)
availability_zonestringThe availability zone of the reservation. (example: us-east-1a)
cache_enginestringThe cache engine type of the Reserved Instance. (example: Redis)
committed_spend_per_hournumber (double)The hourly committed spend for the Savings Plan.
database_enginestringThe database engine of the Reserved Instance. (example: MySQL)
expiration_datestringThe expiration date of the commitment. (example: 2025-12-31T00:00:00Z)
instance_typestringThe EC2 instance type. (example: m5.xlarge)
is_multi_azbooleanWhether the Reserved Instance is Multi-AZ.
meter_sub_categorystringThe Azure meter sub-category for the reservation. (example: D4s v3)
number_of_nfusnumber (double)The number of Normalized Capacity Units.
number_of_reservationsnumber (double)The number of reserved instances.
offering_classstringThe offering class of the Reserved Instance. (example: standard)
operating_systemstringThe operating system of the Reserved Instance. (example: Linux)
purchase_optionstringThe payment option for the Reserved Instance. (example: All Upfront)
regionstringThe AWS region of the Reserved Instance. (example: us-east-1)
savings_plan_typestringThe Savings Plan type. (example: ComputeSavingsPlans)
start_datestringThe start date of the commitment. (example: 2023-01-01T00:00:00Z)
statusstringStatus of an Azure VM Reserved Instance. (running, expired, cancelled) (example: running)
term_lengthnumber (double)The term length in years.
utilizationnumber (double)The utilization percentage of the commitment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_commitments_commitment_listselectprovider, product, start, endfilter_by, commitment_typeGet a list of individual cloud commitments (Reserved Instances or Savings Plans) with their utilization details. The response schema varies based on the provider, product, and commitment type.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endinteger (int64)End of the query time range in Unix milliseconds. (example: 1696118400000)
productstringCloud product identifier (for example, ec2, rds, virtualmachines). (example: ec2)
providerstringCloud provider for commitment programs (aws or azure).
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
startinteger (int64)Start of the query time range in Unix milliseconds. (example: 1693526400000)
commitment_typestringType of commitment to query. ri for Reserved Instances, sp for Savings Plans. Defaults to ri. (wire: commitmentType)
filter_bystringOptional filter expression to narrow down results. (wire: filterBy)

SELECT examples

Get a list of individual cloud commitments (Reserved Instances or Savings Plans) with their utilization details. The response schema varies based on the provider, product, and commitment type.

SELECT
commitment_id,
benefit_name,
availability_zone,
cache_engine,
committed_spend_per_hour,
database_engine,
expiration_date,
instance_type,
is_multi_az,
meter_sub_category,
number_of_nfus,
number_of_reservations,
offering_class,
operating_system,
purchase_option,
region,
savings_plan_type,
start_date,
status,
term_length,
utilization
FROM datadog.cloud_costs.commitments
WHERE provider = '{{ provider }}' -- required
AND product = '{{ product }}' -- required
AND start = '{{ start }}' -- required
AND end = '{{ end }}' -- required
AND filter_by = '{{ filter_by }}'
AND commitment_type = '{{ commitment_type }}'
;