commitments
Creates, updates, deletes, gets or lists a commitments resource.
Overview
| Name | commitments |
| Type | Resource |
| Id | datadog.cloud_costs.commitments |
Fields
The following fields are returned by SELECT queries:
- get_commitments_commitment_list
| Name | Datatype | Description |
|---|---|---|
commitment_id | string | The unique identifier of the Reserved Instance. (example: ri-0123456789abcdef0) |
benefit_name | string | The display name of the Azure reservation. (example: my-vm-reservation) |
availability_zone | string | The availability zone of the reservation. (example: us-east-1a) |
cache_engine | string | The cache engine type of the Reserved Instance. (example: Redis) |
committed_spend_per_hour | number (double) | The hourly committed spend for the Savings Plan. |
database_engine | string | The database engine of the Reserved Instance. (example: MySQL) |
expiration_date | string | The expiration date of the commitment. (example: 2025-12-31T00:00:00Z) |
instance_type | string | The EC2 instance type. (example: m5.xlarge) |
is_multi_az | boolean | Whether the Reserved Instance is Multi-AZ. |
meter_sub_category | string | The Azure meter sub-category for the reservation. (example: D4s v3) |
number_of_nfus | number (double) | The number of Normalized Capacity Units. |
number_of_reservations | number (double) | The number of reserved instances. |
offering_class | string | The offering class of the Reserved Instance. (example: standard) |
operating_system | string | The operating system of the Reserved Instance. (example: Linux) |
purchase_option | string | The payment option for the Reserved Instance. (example: All Upfront) |
region | string | The AWS region of the Reserved Instance. (example: us-east-1) |
savings_plan_type | string | The Savings Plan type. (example: ComputeSavingsPlans) |
start_date | string | The start date of the commitment. (example: 2023-01-01T00:00:00Z) |
status | string | Status of an Azure VM Reserved Instance. (running, expired, cancelled) (example: running) |
term_length | number (double) | The term length in years. |
utilization | number (double) | The utilization percentage of the commitment. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_commitments_commitment_list | select | provider, product, start, end | filter_by, commitment_type | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
end | integer (int64) | End of the query time range in Unix milliseconds. (example: 1696118400000) |
product | string | Cloud product identifier (for example, ec2, rds, virtualmachines). (example: ec2) |
provider | string | Cloud provider for commitment programs (aws or azure). |
site | string | The 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. |
start | integer (int64) | Start of the query time range in Unix milliseconds. (example: 1693526400000) |
commitment_type | string | Type of commitment to query. ri for Reserved Instances, sp for Savings Plans. Defaults to ri. (wire: commitmentType) |
filter_by | string | Optional filter expression to narrow down results. (wire: filterBy) |
SELECT examples
- get_commitments_commitment_list
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 }}'
;